Package com.couchbase.client.java.codec
Interface Transcoder
- All Known Implementing Classes:
JsonTranscoder
,LegacyTranscoder
,RawBinaryTranscoder
,RawJsonTranscoder
,RawStringTranscoder
,Sdk2CompatibleLegacyTranscoder
,SerializableTranscoder
public interface Transcoder
The transcoder is responsible for transcoding KV binary packages between their binary and their java object
representation.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Represents the tuple of encoded value and flags to be used on the wire. -
Method Summary
Modifier and TypeMethodDescriptiondefault <T> T
Decodes the wire representation into the entity based on the data format.<T> T
Decodes the wire representation into the entity based on the data format.Encodes the given input into the wire representation based on the data format.
-
Method Details
-
encode
Encodes the given input into the wire representation based on the data format.- Parameters:
input
- the input object to encode.- Returns:
- the encoded wire representation of the payload.
-
decode
Decodes the wire representation into the entity based on the data format.- Type Parameters:
T
- the generic type used for the decoding target.- Parameters:
target
- the target type to decode.input
- the wire representation to decode.flags
- the flags on the wire- Returns:
- the decoded entity.
-
decode
Decodes the wire representation into the entity based on the data format.- Type Parameters:
T
- the generic type used for the decoding target.- Parameters:
target
- the target type to decode.input
- the wire representation to decode.flags
- the flags on the wire- Returns:
- the decoded entity.
-