Class ShortSchema
- java.lang.Object
-
- org.apache.pulsar.client.impl.schema.AbstractSchema<java.lang.Short>
-
- org.apache.pulsar.client.impl.schema.ShortSchema
-
- All Implemented Interfaces:
java.lang.Cloneable
,org.apache.pulsar.client.api.Schema<java.lang.Short>
public class ShortSchema extends AbstractSchema<java.lang.Short>
A schema for `Short`.
-
-
Constructor Summary
Constructors Constructor Description ShortSchema()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Short
decode(byte[] bytes)
java.lang.Short
decode(io.netty.buffer.ByteBuf byteBuf)
Decode a byteBuf into an object using the schema definition and deserializer implementationbyte[]
encode(java.lang.Short message)
org.apache.pulsar.common.schema.SchemaInfo
getSchemaInfo()
static ShortSchema
of()
void
validate(byte[] message)
void
validate(io.netty.buffer.ByteBuf message)
-
Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema
atSchemaVersion, clone, decode
-
-
-
-
Method Detail
-
of
public static ShortSchema of()
-
validate
public void validate(byte[] message)
-
validate
public void validate(io.netty.buffer.ByteBuf message)
-
encode
public byte[] encode(java.lang.Short message)
-
decode
public java.lang.Short decode(byte[] bytes)
-
decode
public java.lang.Short decode(io.netty.buffer.ByteBuf byteBuf)
Description copied from class:AbstractSchema
Decode 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:
decode
in classAbstractSchema<java.lang.Short>
- Parameters:
byteBuf
- the byte buffer to decode- Returns:
- the deserialized object
-
getSchemaInfo
public org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo()
-
-