Class AvroReader<T>

  • All Implemented Interfaces:
    org.apache.pulsar.client.api.schema.SchemaReader<T>

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

      Constructors 
      Constructor Description
      AvroReader​(org.apache.avro.Schema schema)  
      AvroReader​(org.apache.avro.Schema schema, java.lang.ClassLoader classLoader, boolean jsr310ConversionEnabled)  
      AvroReader​(org.apache.avro.Schema writerSchema, org.apache.avro.Schema readerSchema, java.lang.ClassLoader classLoader, boolean jsr310ConversionEnabled)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.Object> getNativeSchema()  
      T read​(byte[] bytes, int offset, int length)  
      T read​(java.io.InputStream inputStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.pulsar.client.api.schema.SchemaReader

        read, read, read, setSchemaInfoProvider
    • Constructor Detail

      • AvroReader

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

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

        public AvroReader​(org.apache.avro.Schema writerSchema,
                          org.apache.avro.Schema readerSchema,
                          java.lang.ClassLoader classLoader,
                          boolean jsr310ConversionEnabled)
    • Method Detail

      • 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​(java.io.InputStream inputStream)
        Specified by:
        read in interface org.apache.pulsar.client.api.schema.SchemaReader<T>
      • getNativeSchema

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