- All Implemented Interfaces:
Converter<ByteBuf,
,Object> Decoder<ByteBuf,
,Object> Encoder<Object,
,ByteBuf> JoinableEncoder<Object,
,ByteBuf> JoinablePrimitiveEncoder<ByteBuf>
,ObjectConverter<ByteBuf>
,PrimitiveDecoder<ByteBuf>
,PrimitiveEncoder<ByteBuf>
,ReactiveConverter<ByteBuf,
,Object> ReactiveDecoder<ByteBuf,
,Object> ReactiveEncoder<Object,
,ByteBuf> SplittableDecoder<ByteBuf,
,Object> SplittablePrimitiveDecoder<ByteBuf>
- Direct Known Subclasses:
TextByteBufMediaTypeConverter
A Converter
that encodes objects to ByteBuf
and decodes
ByteBuf
to objects.
This implementation relies on a String ObjectConverter
to convert the
string representation of an object from/to ByteBufs.
This converter is an object converter and as such it can convert collection of objects using a customizable separator.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
The default array/list separator -
Constructor Summary
ConstructorDescriptionByteBufConverter
(ObjectConverter<String> stringConverter) Creates a ByteBuf converter backed by the specified string converter, with default charset and array/list separator.ByteBufConverter
(ObjectConverter<String> stringConverter, Charset charset, byte arrayListSeparator) Creates a ByteBuf converter backed by the specified string converter, with specified charset and array/list separator. -
Method Summary
Modifier and TypeMethodDescription<T> T
Decodes the specified value to an object whose type is represented by the specified class.<T> T
Decodes the specified value to an object of the specified type.decodeBigDecimal
(ByteBuf value) Decodes to big decimal.decodeBigInteger
(ByteBuf value) Decodes to big integer.decodeBoolean
(ByteBuf value) Decodes to boolean.decodeByte
(ByteBuf value) Decodes to byte.decodeCharacter
(ByteBuf value) Decodes to character.Class
<?> decodeClass
(ByteBuf value) Decodes to class.decodeCurrency
(ByteBuf value) Decodes to currency.decodeDouble
(ByteBuf value) Decodes to double.decodeFile
(ByteBuf value) Decodes to file.decodeFloat
(ByteBuf value) Decodes to float.decodeInetAddress
(ByteBuf value) Decodes to inet address.decodeInetSocketAddress
(ByteBuf value) Decodes to inet socket address.decodeInteger
(ByteBuf value) Decodes to integer.decodeLocalDate
(ByteBuf value) Decodes to local date.decodeLocalDateTime
(ByteBuf value) Decodes to local datetime.decodeLocale
(ByteBuf value) Decodes to locale.decodeLong
(ByteBuf value) Decodes to long.<T> Flux
<T> decodeMany
(Publisher<ByteBuf> value, Class<T> type) Decodes the specified stream of values whose type is represented by the specified class into a flux stream of values.<T> Flux
<T> decodeMany
(Publisher<ByteBuf> value, Type type) Decodes the specified stream of values whose type is the specified type into a flux stream of values.<T> Mono
<T> Decodes the specified stream of values whose type is represented by the specified class into a mono stream of values.<T> Mono
<T> Decodes the specified stream of values whose type is the specified type into a mono stream of value.decodePath
(ByteBuf value) Decodes to path.decodePattern
(ByteBuf value) Decodes to pattern.decodeShort
(ByteBuf value) Decodes to short.decodeString
(ByteBuf value) Decodes to string.<T> T[]
decodeToArray
(ByteBuf value, Class<T> type) Decodes the specified value whose type is represented by the specified class to an array of decoded values.<T> T[]
decodeToArray
(ByteBuf value, Type type) Decodes the specified value whose type is the specified type to an array of decoded values.<T> List
<T> decodeToList
(ByteBuf value, Class<T> type) Decodes the specified value whose type is represented by the specified class to a list of decoded values.<T> List
<T> decodeToList
(ByteBuf value, Type type) Decodes the specified value whose type is the specified type to a list of decoded values.<T> Set
<T> decodeToSet
(ByteBuf value, Class<T> type) Decodes the specified value whose type is represented by the specified class to a set of decoded values.<T> Set
<T> decodeToSet
(ByteBuf value, Type type) Decodes the specified value whose type is the specified type to a set of decoded values.Decodes to URI.Decodes to URL.decodeZonedDateTime
(ByteBuf value) Decodes to zoned datetime.Encodes file.Encodes boolean.Encodes byte.Encodes character.Encodes class.Encodes double.Encodes float.Encodes integer.Encodes long.Encodes short.Encodes string.encode
(BigDecimal value) Encodes big decimal.encode
(BigInteger value) Encodes big integer.encode
(InetAddress value) Encodes inet address.encode
(InetSocketAddress value) Encodes inet socket address.Encodes URI.Encodes URL.Encodes path.Encodes local date.encode
(LocalDateTime value) Encodes local datetime.encode
(ZonedDateTime value) Encodes zoned datetime.Encodes currency.Encodes locale.Encodes pattern.<T> ByteBuf
encode
(T value) Encodes the specified value to the encoded type.<T> ByteBuf
Encodes the specified value whose type is represented by the specified class to the encoded type.<T> ByteBuf
Encodes the specified value whose type is the specified type to the encoded type.<T> ByteBuf
encodeArray
(T[] value) Encodes the specified array of values to the encoded type.<T> ByteBuf
encodeArray
(T[] value, Class<T> type) Encodes the specified array of values whose type is represented by the specified class to the encoded type.<T> ByteBuf
encodeArray
(T[] value, Type type) Encodes the specified array of values whose type is represented by the specified class to the encoded type.<T> ByteBuf
encodeList
(List<T> value) Encodes the specified list of values to an encoded value.<T> ByteBuf
encodeList
(List<T> value, Class<T> type) Encodes the specified list of values whose type is represented by the specified class to an encoded value.<T> ByteBuf
encodeList
(List<T> value, Type type) Encodes the specified list of values whose type is the specified type to an encoded value.encodeMany
(Flux<T> value) Encodes a flux stream of values to a stream of values.encodeMany
(Flux<T> value, Class<T> type) Encodes a flux stream of values whose type is represented by the specified class to a stream of values.encodeMany
(Flux<T> value, Type type) Encodes a flux stream of values whose type is the specified type to a stream of values.Encodes a mono stream of values to a stream of values.Encodes a mono stream of values whose type is represented by the specified class to a stream of values.Encodes a mono stream of values whose type is the specified type to a stream of values.<T> ByteBuf
Encodes the specified set of values to an encoded value.<T> ByteBuf
Encodes the specified set of values whose type is represented by the specified class to an encoded value.<T> ByteBuf
Encodes the specified set of values whose type is the specified type to an encoded value.byte
Returns the array/list separator used to convert lists and arrays.Returns the charset used to serialize/deserialize to/from ByteBuf.void
setArrayListSeparator
(byte arrayListSeparator) Sets the array/list separator used to convert lists and arrays.void
setCharset
(Charset charset) Sets the charset used to serialize/deserialize to/from ByteBuf.
-
Field Details
-
DEFAULT_ARRAY_LIST_SEPARATOR
public static final byte DEFAULT_ARRAY_LIST_SEPARATORThe default array/list separator- See Also:
-
-
Constructor Details
-
ByteBufConverter
Creates a ByteBuf converter backed by the specified string converter, with default charset and array/list separator.
- Parameters:
stringConverter
- a string converter
-
ByteBufConverter
public ByteBufConverter(ObjectConverter<String> stringConverter, Charset charset, byte arrayListSeparator) Creates a ByteBuf converter backed by the specified string converter, with specified charset and array/list separator.
- Parameters:
stringConverter
- A string convertercharset
- the charsetarrayListSeparator
- the array/list separator
-
-
Method Details
-
getCharset
Returns the charset used to serialize/deserialize to/from ByteBuf.
- Returns:
- a charset
-
setCharset
Sets the charset used to serialize/deserialize to/from ByteBuf.
- Parameters:
charset
- a charset
-
getArrayListSeparator
public byte getArrayListSeparator()Returns the array/list separator used to convert lists and arrays.
- Returns:
- an array/list separator
-
setArrayListSeparator
public void setArrayListSeparator(byte arrayListSeparator) Sets the array/list separator used to convert lists and arrays.
- Parameters:
arrayListSeparator
- an array/list separator
-
decodeOne
Description copied from interface:ReactiveDecoder
Decodes the specified stream of values whose type is represented by the specified class into a mono stream of values.
- Specified by:
decodeOne
in interfaceReactiveDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the stream of values to decodetype
- the class of the decoded object- Returns:
- a mono emitting the decoded value
-
decodeOne
Description copied from interface:ReactiveDecoder
Decodes the specified stream of values whose type is the specified type into a mono stream of value.
- Specified by:
decodeOne
in interfaceReactiveDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the stream of values to decodetype
- the type of the decoded object- Returns:
- a mono emitting the decoded value
-
decodeMany
Description copied from interface:ReactiveDecoder
Decodes the specified stream of values whose type is represented by the specified class into a flux stream of values.
- Specified by:
decodeMany
in interfaceReactiveDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the stream of values to decodetype
- the class of the decoded object- Returns:
- a flux emitting the decoded values
-
decodeMany
Description copied from interface:ReactiveDecoder
Decodes the specified stream of values whose type is the specified type into a flux stream of values.
- Specified by:
decodeMany
in interfaceReactiveDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the stream of values to decodetype
- the type of the decoded object- Returns:
- a flux emitting the decoded values
-
decode
Description copied from interface:Decoder
Decodes the specified value to an object whose type is represented by the specified class.
-
decode
Description copied from interface:Decoder
Decodes the specified value to an object of the specified type.
- Specified by:
decode
in interfaceDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the object to decodetype
- the type of the decoded object- Returns:
- a decoded object
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeToList
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is represented by the specified class to a list of decoded values.
- Specified by:
decodeToList
in interfaceSplittableDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the class of the decoded object- Returns:
- a list of decoded values
-
decodeToList
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is the specified type to a list of decoded values.
- Specified by:
decodeToList
in interfaceSplittableDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the type of the decoded object- Returns:
- a list of decoded values
-
decodeToSet
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is represented by the specified class to a set of decoded values.
- Specified by:
decodeToSet
in interfaceSplittableDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the class of the decoded object- Returns:
- a set of decoded values
-
decodeToSet
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is the specified type to a set of decoded values.
- Specified by:
decodeToSet
in interfaceSplittableDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the type of the decoded object- Returns:
- a set of decoded values
-
decodeToArray
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is represented by the specified class to an array of decoded values.
- Specified by:
decodeToArray
in interfaceSplittableDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the class of the decoded object- Returns:
- an array of decoded values
-
decodeToArray
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is the specified type to an array of decoded values.
- Specified by:
decodeToArray
in interfaceSplittableDecoder<ByteBuf,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the type of the decoded object- Returns:
- an array of decoded values
-
decodeByte
Description copied from interface:PrimitiveDecoder
Decodes to byte.
- Specified by:
decodeByte
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeShort
Description copied from interface:PrimitiveDecoder
Decodes to short.
- Specified by:
decodeShort
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeInteger
Description copied from interface:PrimitiveDecoder
Decodes to integer.
- Specified by:
decodeInteger
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLong
Description copied from interface:PrimitiveDecoder
Decodes to long.
- Specified by:
decodeLong
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeFloat
Description copied from interface:PrimitiveDecoder
Decodes to float.
- Specified by:
decodeFloat
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeDouble
Description copied from interface:PrimitiveDecoder
Decodes to double.
- Specified by:
decodeDouble
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeCharacter
Description copied from interface:PrimitiveDecoder
Decodes to character.
- Specified by:
decodeCharacter
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeBoolean
Description copied from interface:PrimitiveDecoder
Decodes to boolean.
- Specified by:
decodeBoolean
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeString
Description copied from interface:PrimitiveDecoder
Decodes to string.
- Specified by:
decodeString
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeBigInteger
Description copied from interface:PrimitiveDecoder
Decodes to big integer.
- Specified by:
decodeBigInteger
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeBigDecimal
Description copied from interface:PrimitiveDecoder
Decodes to big decimal.
- Specified by:
decodeBigDecimal
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLocalDate
Description copied from interface:PrimitiveDecoder
Decodes to local date.
- Specified by:
decodeLocalDate
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLocalDateTime
Description copied from interface:PrimitiveDecoder
Decodes to local datetime.
- Specified by:
decodeLocalDateTime
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeZonedDateTime
Description copied from interface:PrimitiveDecoder
Decodes to zoned datetime.
- Specified by:
decodeZonedDateTime
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeCurrency
Description copied from interface:PrimitiveDecoder
Decodes to currency.
- Specified by:
decodeCurrency
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLocale
Description copied from interface:PrimitiveDecoder
Decodes to locale.
- Specified by:
decodeLocale
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeFile
Description copied from interface:PrimitiveDecoder
Decodes to file.
- Specified by:
decodeFile
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodePath
Description copied from interface:PrimitiveDecoder
Decodes to path.
- Specified by:
decodePath
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeURI
Description copied from interface:PrimitiveDecoder
Decodes to URI.
- Specified by:
decodeURI
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeURL
Description copied from interface:PrimitiveDecoder
Decodes to URL.
- Specified by:
decodeURL
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodePattern
Description copied from interface:PrimitiveDecoder
Decodes to pattern.
- Specified by:
decodePattern
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeInetAddress
Description copied from interface:PrimitiveDecoder
Decodes to inet address.
- Specified by:
decodeInetAddress
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeInetSocketAddress
Description copied from interface:PrimitiveDecoder
Decodes to inet socket address.
- Specified by:
decodeInetSocketAddress
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeClass
Description copied from interface:PrimitiveDecoder
Decodes to class.
- Specified by:
decodeClass
in interfacePrimitiveDecoder<ByteBuf>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
encodeOne
Description copied from interface:ReactiveEncoder
Encodes a mono stream of values to a stream of values.
- Specified by:
encodeOne
in interfaceReactiveEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the mono stream of values to encode- Returns:
- a stream of encoded values
-
encodeOne
Description copied from interface:ReactiveEncoder
Encodes a mono stream of values whose type is represented by the specified class to a stream of values.
- Specified by:
encodeOne
in interfaceReactiveEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the mono stream of values to encodetype
- the class of the decoded object- Returns:
- a stream of encoded values
-
encodeOne
Description copied from interface:ReactiveEncoder
Encodes a mono stream of values whose type is the specified type to a stream of values.
- Specified by:
encodeOne
in interfaceReactiveEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the mono stream of values to encodetype
- the type of the decoded object- Returns:
- a stream of encoded values
-
encodeMany
Description copied from interface:ReactiveEncoder
Encodes a flux stream of values to a stream of values.
- Specified by:
encodeMany
in interfaceReactiveEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the flux stream of values to encode- Returns:
- a stream of encoded values
-
encodeMany
Description copied from interface:ReactiveEncoder
Encodes a flux stream of values whose type is represented by the specified class to a stream of values.
- Specified by:
encodeMany
in interfaceReactiveEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the flux stream of values to encodetype
- the class of the decoded object- Returns:
- a stream of encoded values
-
encodeMany
Description copied from interface:ReactiveEncoder
Encodes a flux stream of values whose type is the specified type to a stream of values.
- Specified by:
encodeMany
in interfaceReactiveEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the flux stream of values to encodetype
- the type of the decoded object- Returns:
- a stream of encoded values
-
encode
Description copied from interface:Encoder
Encodes the specified value to the encoded type.
-
encode
Description copied from interface:Encoder
Encodes the specified value whose type is represented by the specified class to the encoded type.
- Specified by:
encode
in interfaceEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the object to encodetype
- the class of the decoded object- Returns:
- an encoded object
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:Encoder
Encodes the specified value whose type is the specified type to the encoded type.
- Specified by:
encode
in interfaceEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the object to encodetype
- the type of the decoded object- Returns:
- an encoded object
- Throws:
ConverterException
- if there was an error encoding the value
-
encodeList
Description copied from interface:JoinableEncoder
Encodes the specified list of values to an encoded value.
- Specified by:
encodeList
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the list of objects to encode- Returns:
- an encoded value
-
encodeList
Description copied from interface:JoinableEncoder
Encodes the specified list of values whose type is represented by the specified class to an encoded value.
- Specified by:
encodeList
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the list of objects to encodetype
- the class of the decoded object- Returns:
- an encoded value
-
encodeList
Description copied from interface:JoinableEncoder
Encodes the specified list of values whose type is the specified type to an encoded value.
- Specified by:
encodeList
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the list of objects to encodetype
- the type of the decoded object- Returns:
- an encoded value
-
encodeSet
Description copied from interface:JoinableEncoder
Encodes the specified set of values to an encoded value.
- Specified by:
encodeSet
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the set of objects to encode- Returns:
- an encoded value
-
encodeSet
Description copied from interface:JoinableEncoder
Encodes the specified set of values whose type is represented by the specified class to an encoded value.
- Specified by:
encodeSet
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the set of objects to encodetype
- the class of the decoded object- Returns:
- an encoded value
-
encodeSet
Description copied from interface:JoinableEncoder
Encodes the specified set of values whose type is the specified type to an encoded value.
- Specified by:
encodeSet
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the set of objects to encodetype
- the type of the decoded object- Returns:
- an encoded value
-
encodeArray
Description copied from interface:JoinableEncoder
Encodes the specified array of values to the encoded type.
- Specified by:
encodeArray
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the array of objects to encode- Returns:
- an encoded value
-
encodeArray
Description copied from interface:JoinableEncoder
Encodes the specified array of values whose type is represented by the specified class to the encoded type.
- Specified by:
encodeArray
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the array of objects to encodetype
- the class of the decoded object- Returns:
- an encoded value
-
encodeArray
Description copied from interface:JoinableEncoder
Encodes the specified array of values whose type is represented by the specified class to the encoded type.
- Specified by:
encodeArray
in interfaceJoinableEncoder<Object,
ByteBuf> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the array of objects to encodetype
- the class of the decoded object- Returns:
- an encoded value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes byte.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes short.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes integer.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes long.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes float.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes double.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes character.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes boolean.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes string.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes big integer.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes big decimal.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes local date.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes local datetime.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes zoned datetime.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes currency.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes locale.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes file.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes path.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes URI.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes URL.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes pattern.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes inet address.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes inet socket address.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encode
Description copied from interface:PrimitiveEncoder
Encodes class.
- Specified by:
encode
in interfacePrimitiveEncoder<ByteBuf>
- Parameters:
value
- the value to encode- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-