public class VarInt extends Object
Modifier and Type | Field and Description |
---|---|
long |
value |
Constructor and Description |
---|
VarInt(byte[] buf,
int offset) |
VarInt(long value) |
Modifier and Type | Method and Description |
---|---|
byte[] |
encode() |
int |
getOriginalSizeInBytes()
Gets the number of bytes used to encode this originally if deserialized from a byte array.
|
int |
getSizeInBytes()
Gets the minimum encoded size of the value stored in this VarInt
|
static int |
sizeOf(int value)
Gets the minimum encoded size of the given value.
|
static int |
sizeOf(long value)
Gets the minimum encoded size of the given value.
|
public int getOriginalSizeInBytes()
public int getSizeInBytes()
public static int sizeOf(int value)
public static int sizeOf(long value)
public byte[] encode()
Copyright © 2014. All rights reserved.