public final class GenericConverter extends Object implements ValueConverter
Modifier and Type | Method and Description |
---|---|
Object |
decodeValue(byte[] bytes)
Decode a byte array and convert it into an object depending on the
converter implementation.
|
byte[] |
encodeValue(Object value)
Encode an object as a byte array depending on the converter implementation.
|
static GenericConverter |
getInstance() |
public static GenericConverter getInstance()
public byte[] encodeValue(Object value) throws IOException
ValueConverter
encodeValue
in interface ValueConverter
value
- Value to be encoded.IOException
- if any problem is encountered while encoding.public Object decodeValue(byte[] bytes) throws IOException
ValueConverter
decodeValue
in interface ValueConverter
bytes
- Byte array to be decoded.IOException
- if any problem is encountered while decoding.Copyright © 2008–2023 Apache Software Foundation. All rights reserved.