public final class TranscoderUtils
extends java.lang.Object
Constructor and Description |
---|
TranscoderUtils(boolean pack)
Get an instance of TranscoderUtils.
|
Modifier and Type | Method and 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) |
public TranscoderUtils(boolean pack)
pack
- if true, remove all zero bytes from the MSB of the packed numpublic byte[] encodeNum(long l, int maxBytes)
public byte[] encodeLong(long l)
public long decodeLong(byte[] b)
public byte[] encodeInt(int in)
public int decodeInt(byte[] in)
public byte[] encodeByte(byte in)
public byte decodeByte(byte[] in)
public byte[] encodeBoolean(boolean b)
public boolean decodeBoolean(byte[] in)
Copyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.