Interface Codecs
- All Known Implementing Classes:
DefaultCodecs
public interface Codecs
Encodes and decodes objects.
-
Method Summary
Modifier and TypeMethodDescription<T> TDecode a data to a value.org.h2.value.ValueEncode a value.org.h2.value.ValueencodeNull(Class<?> type) Encode anullvalue.Class<?> preferredType(int dataType) Returns the preferred Java type for a given data type and format.
-
Method Details
-
decode
Decode a data to a value.- Type Parameters:
T- the type of item being returned- Parameters:
value- theValueto decodedataType- the data type of the datatype- the type to decode to- Returns:
- the decoded value
- Throws:
NullPointerException- ifformatortypeisnull
-
encode
Encode a value.- Parameters:
value- the value to encode- Returns:
- the encoded value
- Throws:
NullPointerException- ifvalueisnull
-
encodeNull
Encode anullvalue.- Parameters:
type- the type to encode- Returns:
- the encoded value
- Throws:
NullPointerException- iftypeisnull
-
preferredType
-