Class DateSchema
- java.lang.Object
-
- org.apache.pulsar.client.impl.schema.AbstractSchema<java.util.Date>
-
- org.apache.pulsar.client.impl.schema.DateSchema
-
- All Implemented Interfaces:
java.lang.Cloneable,org.apache.pulsar.client.api.Schema<java.util.Date>
public class DateSchema extends AbstractSchema<java.util.Date>
A schema for `java.util.Date` or `java.sql.Date`.
-
-
Constructor Summary
Constructors Constructor Description DateSchema()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Datedecode(byte[] bytes)java.util.Datedecode(io.netty.buffer.ByteBuf byteBuf)Decode a byteBuf into an object using the schema definition and deserializer implementationbyte[]encode(java.util.Date message)org.apache.pulsar.common.schema.SchemaInfogetSchemaInfo()static DateSchemaof()-
Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema
atSchemaVersion, clone, decode
-
-
-
-
Method Detail
-
of
public static DateSchema of()
-
encode
public byte[] encode(java.util.Date message)
-
decode
public java.util.Date decode(byte[] bytes)
-
decode
public java.util.Date decode(io.netty.buffer.ByteBuf byteBuf)
Description copied from class:AbstractSchemaDecode a byteBuf into an object using the schema definition and deserializer implementationDo not modify reader/writer index of ByteBuf so, it can be reused to access correct data.
- Specified by:
decodein classAbstractSchema<java.util.Date>- Parameters:
byteBuf- the byte buffer to decode- Returns:
- the deserialized object
-
getSchemaInfo
public org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo()
-
-