javaewah
Class IteratingBufferedRunningLengthWord

java.lang.Object
  extended by javaewah.IteratingBufferedRunningLengthWord

public class IteratingBufferedRunningLengthWord
extends Object

Mostly for internal use. Similar to BufferedRunningLengthWord, but automatically advances to the next BufferedRunningLengthWord as words are discarded.

Since:
0.4.0
Author:
David McIntosh

Constructor Summary
IteratingBufferedRunningLengthWord(EWAHIterator iterator)
          Instantiates a new iterating buffered running length word.
 
Method Summary
 void discardFirstWords(long x)
          Discard first words, iterating to the next running length word if needed.
 void discharge(BitmapStorage container)
          Write out the remaining words
 long getDirtyWordAt(int index)
          Get the nth dirty word for the current running length word
 int getNumberOfLiteralWords()
          Gets the number of literal words for the current running length word.
 boolean getRunningBit()
          Gets the running bit.
 long getRunningLength()
          Gets the running length.
 long size()
          Size in uncompressed words of the current running length word.
 void writeDirtyWords(int numWords, BitmapStorage container)
          write the first N dirty words to the target bitmap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratingBufferedRunningLengthWord

public IteratingBufferedRunningLengthWord(EWAHIterator iterator)
Instantiates a new iterating buffered running length word.

Parameters:
iterator - iterator
Method Detail

discardFirstWords

public void discardFirstWords(long x)
Discard first words, iterating to the next running length word if needed.

Parameters:
x - the x

discharge

public void discharge(BitmapStorage container)
Write out the remaining words

Parameters:
container - target for writes

getDirtyWordAt

public long getDirtyWordAt(int index)
Get the nth dirty word for the current running length word

Parameters:
index - zero based index
Returns:
the dirty word

getNumberOfLiteralWords

public int getNumberOfLiteralWords()
Gets the number of literal words for the current running length word.

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

size

public long size()
Size in uncompressed words of the current running length word.

Returns:
the long

writeDirtyWords

public void writeDirtyWords(int numWords,
                            BitmapStorage container)
write the first N dirty words to the target bitmap. Does not discard the words or perform iteration.

Parameters:
numWords -
container -


Copyright © 2012. All Rights Reserved.