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