com.googlecode.javaewah32
Class BufferedRunningLengthWord32

java.lang.Object
  extended by com.googlecode.javaewah32.BufferedRunningLengthWord32
All Implemented Interfaces:
Cloneable

public final class BufferedRunningLengthWord32
extends Object
implements Cloneable

Mostly for internal use. Similar to RunningLengthWord, but can be modified without access to the array, and has faster access.

Since:
0.5.0
Author:
Daniel Lemire

Field Summary
 int literalwordoffset
          how many literal words have we read so far?
 int NumberOfLiteralWords
          The Number of literal words.
 boolean RunningBit
          The Running bit.
 int RunningLength
          The Running length.
 
Constructor Summary
BufferedRunningLengthWord32(int a)
          Instantiates a new buffered running length word.
BufferedRunningLengthWord32(RunningLengthWord32 rlw)
          Instantiates a new buffered running length word.
 
Method Summary
 BufferedRunningLengthWord32 clone()
           
 void discardFirstWords(int x)
          Discard first words.
 int getNumberOfLiteralWords()
          Gets the number of literal words.
 boolean getRunningBit()
          Gets the running bit.
 int getRunningLength()
          Gets the running length.
 void reset(int a)
          Reset the values using the provided word.
 void reset(RunningLengthWord32 rlw)
          Reset the values of this running length word so that it has the same values as the other running length word.
 void setNumberOfLiteralWords(int number)
          Sets the number of literal words.
 void setRunningBit(boolean b)
          Sets the running bit.
 void setRunningLength(int number)
          Sets the running length.
 int size()
          Size in uncompressed words.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

literalwordoffset

public int literalwordoffset
how many literal words have we read so far?


NumberOfLiteralWords

public int NumberOfLiteralWords
The Number of literal words.


RunningBit

public boolean RunningBit
The Running bit.


RunningLength

public int RunningLength
The Running length.

Constructor Detail

BufferedRunningLengthWord32

public BufferedRunningLengthWord32(int a)
Instantiates a new buffered running length word.

Parameters:
a - the word

BufferedRunningLengthWord32

public BufferedRunningLengthWord32(RunningLengthWord32 rlw)
Instantiates a new buffered running length word.

Parameters:
rlw - the rlw
Method Detail

discardFirstWords

public void discardFirstWords(int x)
Discard first words.

Parameters:
x - the number of words to be discarded

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 int getRunningLength()
Gets the running length.

Returns:
the running length

reset

public void reset(int a)
Reset the values using the provided word.

Parameters:
a - the word

reset

public void reset(RunningLengthWord32 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(int number)
Sets the running length.

Parameters:
number - the new running length

size

public int size()
Size in uncompressed words.

Returns:
the int

toString

public String toString()
Overrides:
toString in class Object

clone

public BufferedRunningLengthWord32 clone()
                                  throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException


Copyright © 2014. All Rights Reserved.