Interface ValueConverter
- All Known Subinterfaces:
NumericValueConverter
- All Known Implementing Classes:
GenericConverter,LongConverter
public interface ValueConverter
Converter used to encode/decode value associated with a column prefix or a
column.
-
Method Summary
Modifier and TypeMethodDescriptiondecodeValue(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.
-
Method Details
-
encodeValue
Encode an object as a byte array depending on the converter implementation.- Parameters:
value- Value to be encoded.- Returns:
- a byte array
- Throws:
IOException- if any problem is encountered while encoding.
-
decodeValue
Decode a byte array and convert it into an object depending on the converter implementation.- Parameters:
bytes- Byte array to be decoded.- Returns:
- an object
- Throws:
IOException- if any problem is encountered while decoding.
-