Class IntSchema

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

public class IntSchema extends AbstractSchema<Integer>
A schema for `Integer`.
  • Constructor Details

    • IntSchema

      public IntSchema()
  • Method Details

    • of

      public static IntSchema of()
    • validate

      public void validate(byte[] message)
    • validate

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

      public byte[] encode(Integer message)
    • decode

      public Integer decode(byte[] bytes)
    • decode

      public Integer 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<Integer>
      Parameters:
      byteBuf - the byte buffer to decode
      Returns:
      the deserialized object
    • getSchemaInfo

      public SchemaInfo getSchemaInfo()