Example usage for com.amazonaws.services.kinesis.model PutRecordRequest getData

List of usage examples for com.amazonaws.services.kinesis.model PutRecordRequest getData

Introduction

In this page you can find the example usage for com.amazonaws.services.kinesis.model PutRecordRequest getData.

Prototype


public java.nio.ByteBuffer getData() 

Source Link

Document

The data blob to put into the record, which is base64-encoded when the blob is serialized.

Usage

From source file:com.facebook.presto.kinesis.util.MockKinesisClient.java

License:Apache License

@Override
public PutRecordResult putRecord(PutRecordRequest putRecordRequest)
        throws AmazonServiceException, AmazonClientException {
    // Setup method to add a new record:
    InternalStream theStream = this.getStream(putRecordRequest.getStreamName());
    if (theStream != null) {
        PutRecordResult result = theStream.putRecord(putRecordRequest.getData(),
                putRecordRequest.getPartitionKey());
        return result;
    } else {/*  w w  w . j ava2 s. c om*/
        throw new AmazonClientException("This stream does not exist!");
    }
}