public class WhalinTranscoder extends BaseSerializingTranscoder implements Transcoder<Object>
Modifier and Type | Field and Description |
---|---|
static int |
COMPRESSED |
static int |
SERIALIZED |
static int |
SPECIAL_BOOLEAN |
static int |
SPECIAL_BYTE |
static int |
SPECIAL_BYTEARRAY |
static int |
SPECIAL_CHARACTER |
static int |
SPECIAL_DATE |
static int |
SPECIAL_DOUBLE |
static int |
SPECIAL_FLOAT |
static int |
SPECIAL_INT |
static int |
SPECIAL_LONG |
static int |
SPECIAL_SHORT |
static int |
SPECIAL_STRING |
static int |
SPECIAL_STRINGBUFFER |
static int |
SPECIAL_STRINGBUILDER |
charset, compressionThreshold, compressMode, DEFAULT_CHARSET, DEFAULT_COMPRESSION_THRESHOLD, log
Constructor and Description |
---|
WhalinTranscoder() |
WhalinTranscoder(int maxSize) |
Modifier and Type | Method and Description |
---|---|
Object |
decode(CachedData d)
Decode the cached object into the object it represents.
|
boolean |
decodeBoolean(byte[] in) |
protected Character |
decodeCharacter(byte[] b) |
CachedData |
encode(Object o)
Encode the given object for storage.
|
byte[] |
encodeBoolean(boolean b) |
int |
getMaxSize() |
boolean |
isPackZeros()
Returns if transcoder packs zero.
|
boolean |
isPrimitiveAsString()
Returns if client stores primitive type as string.
|
void |
setMaxSize(int maxSize) |
void |
setPackZeros(boolean packZeros)
Set whether pack zeros
|
void |
setPrimitiveAsString(boolean primitiveAsString)
Set whether store primitive type as string.
|
compress, decodeString, decompress, deserialize, encodeString, getCompressMode, serialize, setCharset, setCompressionMode, setCompressionThreshold
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setCompressionMode, setCompressionThreshold
public static final int SPECIAL_BYTE
public static final int SPECIAL_BOOLEAN
public static final int SPECIAL_INT
public static final int SPECIAL_LONG
public static final int SPECIAL_CHARACTER
public static final int SPECIAL_STRING
public static final int SPECIAL_STRINGBUFFER
public static final int SPECIAL_FLOAT
public static final int SPECIAL_SHORT
public static final int SPECIAL_DOUBLE
public static final int SPECIAL_DATE
public static final int SPECIAL_STRINGBUILDER
public static final int SPECIAL_BYTEARRAY
public static final int COMPRESSED
public static final int SERIALIZED
public WhalinTranscoder()
public WhalinTranscoder(int maxSize)
public void setPackZeros(boolean packZeros)
Transcoder
setPackZeros
in interface Transcoder<Object>
public void setPrimitiveAsString(boolean primitiveAsString)
Transcoder
setPrimitiveAsString
in interface Transcoder<Object>
public final int getMaxSize()
public final void setMaxSize(int maxSize)
public boolean isPackZeros()
Transcoder
isPackZeros
in interface Transcoder<Object>
public boolean isPrimitiveAsString()
Transcoder
isPrimitiveAsString
in interface Transcoder<Object>
public Object decode(CachedData d)
Transcoder
decode
in interface Transcoder<Object>
d
- the datapublic CachedData encode(Object o)
Transcoder
encode
in interface Transcoder<Object>
o
- the objectprotected Character decodeCharacter(byte[] b)
public byte[] encodeBoolean(boolean b)
public boolean decodeBoolean(byte[] in)
Copyright © 2021. All rights reserved.