Package com.couchbase.client.java.codec
Class LegacyTranscoder
- java.lang.Object
-
- com.couchbase.client.java.codec.LegacyTranscoder
-
- All Implemented Interfaces:
Transcoder
public class LegacyTranscoder extends Object implements Transcoder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.couchbase.client.java.codec.Transcoder
Transcoder.EncodedValue
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LegacyTranscodercreate(JsonSerializer jsonSerializer)<T> Tdecode(TypeRef<T> target, byte[] input, int flags)Decodes the wire representation into the entity based on the data format.<T> Tdecode(Class<T> target, byte[] input, int flags)Decodes the wire representation into the entity based on the data format.Transcoder.EncodedValueencode(Object input)Encodes the given input into the wire representation based on the data format.
-
-
-
Method Detail
-
create
public static LegacyTranscoder create(JsonSerializer jsonSerializer)
-
encode
public Transcoder.EncodedValue encode(Object input)
Description copied from interface:TranscoderEncodes the given input into the wire representation based on the data format.- Specified by:
encodein interfaceTranscoder- Parameters:
input- the input object to encode.- Returns:
- the encoded wire representation of the payload.
-
decode
public <T> T decode(Class<T> target, byte[] input, int flags)
Description copied from interface:TranscoderDecodes the wire representation into the entity based on the data format.- Specified by:
decodein interfaceTranscoder- 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
public <T> T decode(TypeRef<T> target, byte[] input, int flags)
Description copied from interface:TranscoderDecodes the wire representation into the entity based on the data format.- Specified by:
decodein interfaceTranscoder- 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.
-
-