Package net.spy.memcached.transcoders
Class TranscoderUtils
- java.lang.Object
-
- net.spy.memcached.transcoders.TranscoderUtils
-
public final class TranscoderUtils extends java.lang.Object
Utility class for transcoding Java types.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
packZeros
-
Constructor Summary
Constructors Constructor Description TranscoderUtils(boolean pack)
Get an instance of TranscoderUtils.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
decodeBoolean(byte[] in)
byte
decodeByte(byte[] in)
int
decodeInt(byte[] in)
long
decodeLong(byte[] b)
byte[]
encodeBoolean(boolean b)
byte[]
encodeByte(byte in)
byte[]
encodeInt(int in)
byte[]
encodeLong(long l)
byte[]
encodeNum(long l, int maxBytes)
-
-
-
Method Detail
-
encodeNum
public byte[] encodeNum(long l, int maxBytes)
-
encodeLong
public byte[] encodeLong(long l)
-
decodeLong
public long decodeLong(byte[] b)
-
encodeInt
public byte[] encodeInt(int in)
-
decodeInt
public int decodeInt(byte[] in)
-
encodeByte
public byte[] encodeByte(byte in)
-
decodeByte
public byte decodeByte(byte[] in)
-
encodeBoolean
public byte[] encodeBoolean(boolean b)
-
decodeBoolean
public boolean decodeBoolean(byte[] in)
-
-