| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private int | |
| private boolean | |
| private long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the decoded integer or -1 to indicate that more data is needed.the buffer containing the encoded integer. buffer)Decode an integer from the buffer. |
| public long | Returns: the decoded long or -1 to indicate that more data is needed.the buffer containing the encoded integer. buffer)Decode a long from the buffer. |
| public void | |
| public void | setPrefix(int
the number of bits in the integer prefix. prefix)Set the prefix length in of the integer representation in bits. |
| _multiplier | back to summary |
|---|---|
| private long _multiplier | |
| _prefix | back to summary |
|---|---|
| private int _prefix | |
| _started | back to summary |
|---|---|
| private boolean _started | |
| _total | back to summary |
|---|---|
| private long _total | |
| NBitIntegerDecoder | back to summary |
|---|---|
| public NBitIntegerDecoder() | |
| decodeInt | back to summary |
|---|---|
| public int decodeInt(ByteBuffer buffer) Decode an integer from the buffer. If the buffer does not contain the complete integer representation
a value of -1 is returned to indicate that more data is needed to complete parsing.
This should be only after the prefix has been set with
| |
| decodeLong | back to summary |
|---|---|
| public long decodeLong(ByteBuffer buffer) Decode a long from the buffer. If the buffer does not contain the complete integer representation
a value of -1 is returned to indicate that more data is needed to complete parsing.
This should be only after the prefix has been set with
| |
| reset | back to summary |
|---|---|
| public void reset() Reset the internal state of the parser. | |
| setPrefix | back to summary |
|---|---|
| public void setPrefix(int prefix) Set the prefix length in of the integer representation in bits. A prefix of 6 means the integer representation starts after the first 2 bits.
| |