@InterfaceAudience.Public @InterfaceStability.Stable public interface SchemaReader<T>
Modifier and Type | Method and Description |
---|---|
default T |
read(byte[] bytes)
Serialize bytes convert pojo.
|
default T |
read(byte[] bytes,
byte[] schemaVersion)
Serialize bytes convert pojo.
|
T |
read(byte[] bytes,
int offset,
int length)
serialize bytes convert pojo.
|
T |
read(InputStream inputStream)
serialize bytes convert pojo.
|
default T |
read(InputStream inputStream,
byte[] schemaVersion)
serialize bytes convert pojo.
|
default void |
setSchemaInfoProvider(SchemaInfoProvider schemaInfoProvider)
Set schema info provider, this method support multi version reader.
|
default T read(byte[] bytes)
bytes
- the dataT read(byte[] bytes, int offset, int length)
bytes
- the dataoffset
- the byte[] initial positionlength
- the byte[] read lengthT read(InputStream inputStream)
inputStream
- the stream of messagedefault T read(byte[] bytes, byte[] schemaVersion)
bytes
- the dataschemaVersion
- the schema version of messagedefault T read(InputStream inputStream, byte[] schemaVersion)
inputStream
- the stream of messageschemaVersion
- the schema version of messagedefault void setSchemaInfoProvider(SchemaInfoProvider schemaInfoProvider)
schemaInfoProvider
- the stream of messageCopyright © 2017–2020 Apache Software Foundation. All rights reserved.