Class GenericAvroReader
- java.lang.Object
-
- org.apache.pulsar.client.impl.schema.generic.GenericAvroReader
-
- All Implemented Interfaces:
org.apache.pulsar.client.api.schema.SchemaReader<org.apache.pulsar.client.api.schema.GenericRecord>
public class GenericAvroReader extends java.lang.Object implements org.apache.pulsar.client.api.schema.SchemaReader<org.apache.pulsar.client.api.schema.GenericRecord>
-
-
Constructor Summary
Constructors Constructor Description GenericAvroReader(org.apache.avro.Schema schema)GenericAvroReader(org.apache.avro.Schema writerSchema, org.apache.avro.Schema readerSchema, byte[] schemaVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.Object>getNativeSchema()intgetOffset()GenericAvroRecordread(byte[] bytes, int offset, int length)org.apache.pulsar.client.api.schema.GenericRecordread(java.io.InputStream inputStream)
-
-
-
Method Detail
-
read
public GenericAvroRecord read(byte[] bytes, int offset, int length)
- Specified by:
readin interfaceorg.apache.pulsar.client.api.schema.SchemaReader<org.apache.pulsar.client.api.schema.GenericRecord>
-
read
public org.apache.pulsar.client.api.schema.GenericRecord read(java.io.InputStream inputStream)
- Specified by:
readin interfaceorg.apache.pulsar.client.api.schema.SchemaReader<org.apache.pulsar.client.api.schema.GenericRecord>
-
getOffset
public int getOffset()
-
getNativeSchema
public java.util.Optional<java.lang.Object> getNativeSchema()
- Specified by:
getNativeSchemain interfaceorg.apache.pulsar.client.api.schema.SchemaReader<org.apache.pulsar.client.api.schema.GenericRecord>
-
-