public class ULEB128 extends Object
Constructor and Description |
---|
ULEB128() |
Modifier and Type | Method and Description |
---|---|
static long |
read(ByteBuffer byteBuffer)
Reads a number encoded as ULEB128.
|
static int |
size(long value)
Computes the size when encoding values using ULEB128.
|
static int |
write(ByteBuffer byteBuffer,
long value)
Encodes a value using ULEB128 encoding.
|
public static int size(long value)
value
- The value for which to return the size of in ULEB128.public static int write(ByteBuffer byteBuffer, long value)
byteBuffer
- The output destination used for encoding.value
- The value to encode.public static long read(ByteBuffer byteBuffer)
java.lang.IllegalStateException
exception is thrown because long
stores a maximum of
64bits.byteBuffer
- The source which to read from.