Class AvroReader<T>

java.lang.Object
org.apache.pulsar.client.impl.schema.reader.AvroReader<T>
All Implemented Interfaces:
org.apache.pulsar.client.api.schema.SchemaReader<T>

public class AvroReader<T> extends Object implements org.apache.pulsar.client.api.schema.SchemaReader<T>
  • Constructor Details

    • AvroReader

      public AvroReader(org.apache.avro.Schema schema)
    • AvroReader

      public AvroReader(org.apache.avro.Schema schema, ClassLoader classLoader, boolean jsr310ConversionEnabled)
    • AvroReader

      public AvroReader(org.apache.avro.Schema writerSchema, org.apache.avro.Schema readerSchema, ClassLoader classLoader, boolean jsr310ConversionEnabled)
  • Method Details

    • read

      public T read(byte[] bytes, int offset, int length)
      Specified by:
      read in interface org.apache.pulsar.client.api.schema.SchemaReader<T>
    • read

      public T read(InputStream inputStream)
      Specified by:
      read in interface org.apache.pulsar.client.api.schema.SchemaReader<T>
    • getNativeSchema

      public Optional<Object> getNativeSchema()
      Specified by:
      getNativeSchema in interface org.apache.pulsar.client.api.schema.SchemaReader<T>