Class ByteSchema

java.lang.Object
org.apache.pulsar.client.impl.schema.AbstractSchema<Byte>
org.apache.pulsar.client.impl.schema.ByteSchema
All Implemented Interfaces:
Cloneable, Schema<Byte>

public class ByteSchema extends AbstractSchema<Byte>
A schema for 'Byte'.
  • Constructor Details

    • ByteSchema

      public ByteSchema()
  • Method Details

    • of

      public static ByteSchema of()
    • validate

      public void validate(byte[] message)
    • validate

      public void validate(io.netty.buffer.ByteBuf message)
    • encode

      public byte[] encode(Byte message)
    • decode

      public Byte decode(byte[] bytes)
    • decode

      public Byte decode(io.netty.buffer.ByteBuf byteBuf)
      Description copied from class: AbstractSchema
      Decode a byteBuf into an object using the schema definition and deserializer implementation

      Do not modify reader/writer index of ByteBuf so, it can be reused to access correct data.

      Specified by:
      decode in class AbstractSchema<Byte>
      Parameters:
      byteBuf - the byte buffer to decode
      Returns:
      the deserialized object
    • getSchemaInfo

      public SchemaInfo getSchemaInfo()