public class Sdk2CompatibleLegacyTranscoder extends Object implements Transcoder
Transcoder.EncodedValue| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COMPRESSION_THRESHOLD |
static Sdk2CompatibleLegacyTranscoder |
INSTANCE |
| Constructor and Description |
|---|
Sdk2CompatibleLegacyTranscoder() |
Sdk2CompatibleLegacyTranscoder(int compressionThreshold) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
compress(byte[] in) |
<T> T |
decode(Class<T> target,
byte[] input,
int flags)
Decodes the wire representation into the entity based on the data format.
|
protected byte[] |
decompress(byte[] in) |
protected Object |
deserialize(byte[] in) |
Transcoder.EncodedValue |
encode(Object input)
Encodes the given input into the wire representation based on the data format.
|
static byte[] |
encodeNum(long l,
int maxBytes) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecodepublic static final Sdk2CompatibleLegacyTranscoder INSTANCE
public static final int DEFAULT_COMPRESSION_THRESHOLD
public Sdk2CompatibleLegacyTranscoder()
public Sdk2CompatibleLegacyTranscoder(int compressionThreshold)
public Transcoder.EncodedValue encode(Object input)
Transcoderencode in interface Transcoderinput - the input object to encode.public <T> T decode(Class<T> target, byte[] input, int flags)
Transcoderdecode in interface TranscoderT - the generic type used for the decoding target.target - the target type to decode.input - the wire representation to decode.flags - the flags on the wireprotected byte[] compress(byte[] in)
protected byte[] decompress(byte[] in)
public static byte[] encodeNum(long l,
int maxBytes)
protected Object deserialize(byte[] in)
Copyright © 2024 Couchbase, Inc.. All rights reserved.