Class DateSchema

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

public class DateSchema extends AbstractSchema<Date>
A schema for `java.util.Date` or `java.sql.Date`.
  • Constructor Details

    • DateSchema

      public DateSchema()
  • Method Details

    • of

      public static DateSchema of()
    • encode

      public byte[] encode(Date message)
    • decode

      public Date decode(byte[] bytes)
    • decode

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

      public SchemaInfo getSchemaInfo()