public class ShortSchema extends AbstractSchema<Short>
BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP| Constructor and Description |
|---|
ShortSchema() |
| Modifier and Type | Method and Description |
|---|---|
Short |
decode(byte[] bytes) |
Short |
decode(io.netty.buffer.ByteBuf byteBuf)
Decode a byteBuf into an object using the schema definition and deserializer implementation
|
byte[] |
encode(Short message) |
SchemaInfo |
getSchemaInfo() |
static ShortSchema |
of() |
void |
validate(byte[] message) |
void |
validate(io.netty.buffer.ByteBuf message)
Check if the message read able length length is a valid object for this schema.
|
atSchemaVersion, clone, decodeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitAUTO_CONSUME, AUTO_PRODUCE_BYTES, AUTO_PRODUCE_BYTES, AUTO, AVRO, AVRO, configureSchemaInfo, decode, decode, generic, getNativeSchema, getSchema, JSON, JSON, KeyValue, KeyValue, KeyValue, KeyValue, KV_BYTES, PROTOBUF_NATIVE, PROTOBUF_NATIVE, PROTOBUF, PROTOBUF, requireFetchingSchemaInfo, setSchemaInfoProvider, supportSchemaVersioningpublic static ShortSchema of()
public void validate(byte[] message)
public void validate(io.netty.buffer.ByteBuf message)
AbstractSchemaThe implementation can choose what its most efficient approach to validate the schema.
If the implementation doesn't provide it, it will attempt to use AbstractSchema.decode(ByteBuf)
to see if this schema can decode this message or not as a validation mechanism to verify
the bytes.
message - the messages to verifypublic byte[] encode(Short message)
public Short decode(byte[] bytes)
public Short decode(io.netty.buffer.ByteBuf byteBuf)
AbstractSchemaDo not modify reader/writer index of ByteBuf so, it can be reused to access correct data.
decode in class AbstractSchema<Short>byteBuf - the byte buffer to decodepublic SchemaInfo getSchemaInfo()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.