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