Decoder for IndexNumberEncoder. Not thread-safe.
| int |
decode(boolean descending, byte[] buffer, int offset)
Reads bytes encoding a number from the buffer at the offset, in the order specified by
descending, and returns the new offset.
|
| boolean |
isResultDouble()
Returns whether the decoded number is representable as a double.
|
| boolean |
isResultLong()
Returns whether the decoded number is representable as a long.
|
| void |
reset()
Reset the decoder.
|
| double |
resultAsDouble()
Returns the decoded number as a double, or throws IllegalArgumentException if not possible.
|
| long |
resultAsLong()
Returns the decoded number as a long, or throws IllegalArgumentException if not possible.
|
Reads bytes encoding a number from the buffer at the offset, in the order specified by descending, and returns the new offset.
The decoded number is accessible via isResultLong(), resultAsLong(), isResultDouble(), resultAsDouble().
| descending | when true, expect an encoding that orders numbers in descending order |
|---|---|
| buffer | bytes to read |
| offset | index into buffer of first byte to read |
Returns whether the decoded number is representable as a double.
Returns whether the decoded number is representable as a long.
Reset the decoder. Erases the result of the last call to decode(boolean, byte[], int).
Returns the decoded number as a double, or throws IllegalArgumentException if not possible.
Returns the decoded number as a long, or throws IllegalArgumentException if not possible.