org.apache.hadoop.hbase.util.vint
Class UVIntTool
java.lang.Object
org.apache.hadoop.hbase.util.vint.UVIntTool
@InterfaceAudience.Private
public class UVIntTool
- extends Object
Simple Variable Length Integer encoding. Left bit of 0 means we are on the last byte. If left
bit of the current byte is 1, then there is at least one more byte.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BYTE_7_RIGHT_BITS_SET
public static final byte BYTE_7_RIGHT_BITS_SET
- See Also:
- Constant Field Values
BYTE_LEFT_BIT_SET
public static final byte BYTE_LEFT_BIT_SET
- See Also:
- Constant Field Values
INT_7_RIGHT_BITS_SET
public static final long INT_7_RIGHT_BITS_SET
- See Also:
- Constant Field Values
INT_8TH_BIT_SET
public static final long INT_8TH_BIT_SET
- See Also:
- Constant Field Values
MAX_VALUE_BYTES
public static final byte[] MAX_VALUE_BYTES
UVIntTool
public UVIntTool()
numBytes
public static int numBytes(int in)
- int -> bytes
getBytes
public static byte[] getBytes(int value)
writeBytes
public static int writeBytes(int value,
OutputStream os)
throws IOException
- Throws:
IOException
getInt
public static int getInt(byte[] bytes)
- bytes -> int
getInt
public static int getInt(byte[] bytes,
int offset)
getInt
public static int getInt(InputStream is)
throws IOException
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.