Class ExampleCsvSourceNativeInfo
java.lang.Object
io.aiven.commons.kafka.connector.source.AbstractSourceNativeInfo<String,ByteBuffer>
io.aiven.commons.kafka.connector.source.impl.csv.ExampleCsvSourceNativeInfo
- All Implemented Interfaces:
Comparable<AbstractSourceNativeInfo<String,ByteBuffer>>
This example data object has a String key and a byte buffer as its data object.
-
Field Summary
Fields inherited from class io.aiven.commons.kafka.connector.source.AbstractSourceNativeInfo
nativeInfo, UNKNOWN_STREAM_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGets an estimate of the input stream length.Creates the context for the native info.protected InputStreamRead the input data from the nativeInfo.Methods inherited from class io.aiven.commons.kafka.connector.source.AbstractSourceNativeInfo
compareTo, getInputStreamSupplier, nativeKey, toString
-
Constructor Details
-
ExampleCsvSourceNativeInfo
Constructor.- Parameters:
item- the ExampleNativeItem comprising a key of String and a data item of ByteBuffer.
-
-
Method Details
-
getContext
Description copied from class:AbstractSourceNativeInfoCreates the context for the native info.- Specified by:
getContextin classAbstractSourceNativeInfo<String,ByteBuffer> - Returns:
- the context for the native Info.
-
getInputStream
Description copied from class:AbstractSourceNativeInfoRead the input data from the nativeInfo.- Specified by:
getInputStreamin classAbstractSourceNativeInfo<String,ByteBuffer> - Returns:
- the input stream
- Throws:
IOException- on IO error.
-
estimateInputStreamLength
Description copied from class:AbstractSourceNativeInfoGets an estimate of the input stream length.- Specified by:
estimateInputStreamLengthin classAbstractSourceNativeInfo<String,ByteBuffer> - Returns:
- an estimate of the input stream length, or
AbstractSourceNativeInfo.UNKNOWN_STREAM_LENGTHif not known. - Throws:
UnsupportedOperationException- if the underlying NativeInfo does not support input streams.
-