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