Package io.datarouter.bytes
Class VarIntTool
java.lang.Object
io.datarouter.bytes.VarIntTool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intdecodeInt(byte[] bytes) static intdecodeInt(byte[] bytes, int offset) static longdecodeLong(byte[] bytes) static longdecodeLong(byte[] bytes, int offset) static byte[]encode(long value) static intlength(long value)
-
Constructor Details
-
VarIntTool
public VarIntTool()
-
-
Method Details
-
length
public static int length(long value) -
encode
public static byte[] encode(long value) -
decodeLong
public static long decodeLong(byte[] bytes, int offset) -
decodeLong
public static long decodeLong(byte[] bytes) -
decodeInt
public static int decodeInt(byte[] bytes, int offset) -
decodeInt
public static int decodeInt(byte[] bytes) -
fromInputStream
-