T - the type that is handled by this codec.public interface Codec<T>
Use ParametrizedCodec for support ParameterizedType encoding/decoding.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(MySqlColumnMetadata metadata,
Class<?> target)
Check if can decode the field value as specified
Class. |
boolean |
canEncode(Object value)
Check if can encode the specified value.
|
T |
decode(io.netty.buffer.ByteBuf value,
MySqlColumnMetadata metadata,
Class<?> target,
boolean binary,
CodecContext context)
Decode a
ByteBuf as specified Class. |
MySqlParameter |
encode(Object value,
CodecContext context)
Encode a value to a
MySqlParameter. |
@Nullable T decode(io.netty.buffer.ByteBuf value, MySqlColumnMetadata metadata, Class<?> target, boolean binary, CodecContext context)
ByteBuf as specified Class.value - the ByteBuf.metadata - the metadata of the column.target - the specified Class.binary - if the value should be decoded by binary protocol.context - the codec context.boolean canDecode(MySqlColumnMetadata metadata, Class<?> target)
Class.metadata - the metadata of the column.target - the specified Class.boolean canEncode(Object value)
value - the specified value.MySqlParameter encode(Object value, CodecContext context)
MySqlParameter.value - the specified value.context - the codec context.MySqlParameter.Copyright © 2018–2023 asyncer.io. All rights reserved.