Class ByteSchema
java.lang.Object
org.apache.pulsar.client.impl.schema.AbstractSchema<Byte>
org.apache.pulsar.client.impl.schema.ByteSchema
A schema for 'Byte'.
-
Field Summary
Fields inherited from interface org.apache.pulsar.client.api.Schema
BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema
atSchemaVersion, clone, decode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.pulsar.client.api.Schema
configureSchemaInfo, decode, decode, decode, getNativeSchema, requireFetchingSchemaInfo, setSchemaInfoProvider, supportSchemaVersioning
-
Constructor Details
-
ByteSchema
public ByteSchema()
-
-
Method Details
-
of
-
validate
public void validate(byte[] message) -
validate
public void validate(io.netty.buffer.ByteBuf message) -
encode
-
decode
-
decode
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<Byte>
- Parameters:
byteBuf
- the byte buffer to decode- Returns:
- the deserialized object
-
getSchemaInfo
-