public class BigEndianAscendingWordDeserializer extends Object implements IWordDeserializer
BigEndianAscendingWordSerializer
.Constructor and Description |
---|
BigEndianAscendingWordDeserializer(int wordLength,
int bytePadding,
byte[] bytes) |
Modifier and Type | Method and Description |
---|---|
long |
readWord() |
int |
totalWordCount()
Returns the number of words that could be encoded in the sequence.
NOTE: the sequence that was encoded may be shorter than the value this
method returns due to padding issues within bytes.
|
public BigEndianAscendingWordDeserializer(int wordLength, int bytePadding, byte[] bytes)
wordLength
- the length in bits of the words to be deserialized. Must
be less than or equal to 64 and greater than or equal to 1.bytePadding
- the number of leading bytes that pad the serialized words.
Must be greater than or equal to zero.bytes
- the byte array containing the serialized words. Cannot be
null
.public long readWord()
readWord
in interface IWordDeserializer
IWordDeserializer.totalWordCount()
times.public int totalWordCount()
IWordDeserializer
IWordDeserializer.readWord()
can be called.totalWordCount
in interface IWordDeserializer
Copyright © 2016. All rights reserved.