Package com.googlecode.javaewah
Class BufferedRunningLengthWord
- java.lang.Object
-
- com.googlecode.javaewah.BufferedRunningLengthWord
-
-
Field Summary
Fields Modifier and Type Field Description protected intliteralWordOffsethow many literal words have we read so far?protected intnumberOfLiteralWordsThe Number of literal words.protected booleanrunningBitThe Running bit.protected longrunningLengthThe Running length.
-
Constructor Summary
Constructors Constructor Description BufferedRunningLengthWord(long a)Instantiates a new buffered running length word.BufferedRunningLengthWord(RunningLengthWord rlw)Instantiates a new buffered running length word.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferedRunningLengthWordclone()voiddiscardFirstWords(long x)Discard first words.intgetNumberOfLiteralWords()Gets the number of literal words.booleangetRunningBit()Gets the running bit.longgetRunningLength()Gets the running length.voidreset(long a)Reset the values using the provided word.voidreset(RunningLengthWord rlw)Reset the values of this running length word so that it has the same values as the other running length word.voidsetNumberOfLiteralWords(int number)Sets the number of literal words.voidsetRunningBit(boolean b)Sets the running bit.voidsetRunningLength(long number)Sets the running length.longsize()Size in uncompressed words.StringtoString()
-
-
-
Field Detail
-
literalWordOffset
protected int literalWordOffset
how many literal words have we read so far?
-
numberOfLiteralWords
protected int numberOfLiteralWords
The Number of literal words.
-
runningBit
protected boolean runningBit
The Running bit.
-
runningLength
protected long runningLength
The Running length.
-
-
Constructor Detail
-
BufferedRunningLengthWord
public BufferedRunningLengthWord(long a)
Instantiates a new buffered running length word.- Parameters:
a- the word
-
BufferedRunningLengthWord
public BufferedRunningLengthWord(RunningLengthWord rlw)
Instantiates a new buffered running length word.- Parameters:
rlw- the rlw
-
-
Method Detail
-
discardFirstWords
public void discardFirstWords(long x)
Discard first words.- Parameters:
x- the x
-
getNumberOfLiteralWords
public int getNumberOfLiteralWords()
Gets the number of literal words.- Returns:
- the number of literal words
-
getRunningBit
public boolean getRunningBit()
Gets the running bit.- Returns:
- the running bit
-
getRunningLength
public long getRunningLength()
Gets the running length.- Returns:
- the running length
-
reset
public void reset(long a)
Reset the values using the provided word.- Parameters:
a- the word
-
reset
public void reset(RunningLengthWord rlw)
Reset the values of this running length word so that it has the same values as the other running length word.- Parameters:
rlw- the other running length word
-
setNumberOfLiteralWords
public void setNumberOfLiteralWords(int number)
Sets the number of literal words.- Parameters:
number- the new number of literal words
-
setRunningBit
public void setRunningBit(boolean b)
Sets the running bit.- Parameters:
b- the new running bit
-
setRunningLength
public void setRunningLength(long number)
Sets the running length.- Parameters:
number- the new running length
-
size
public long size()
Size in uncompressed words.- Returns:
- the long
-
clone
public BufferedRunningLengthWord clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
-