com.voytechs.jnetstream.io
Class BitStackInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.voytechs.jnetstream.io.StackInputStream
          extended by com.voytechs.jnetstream.io.BitStackInputStream
All Implemented Interfaces:
java.io.Closeable

public class BitStackInputStream
extends StackInputStream

todo comment this class :)


Field Summary
 
Fields inherited from class com.voytechs.jnetstream.io.StackInputStream
buf, count, markers, offset, positions
 
Constructor Summary
BitStackInputStream(java.io.InputStream inputStream)
           
BitStackInputStream(java.io.InputStream inputStream, int bufSize)
           
 
Method Summary
 void clear()
          Clears the last entry on the stack without rewinding to the position on the entry being cleared.
static void main(java.lang.String[] args)
          Test function for BitStackInputStream
 int popOnBitBoundary()
           
 void push(int bitsLeft)
           
 void push(int bitsLeft, java.lang.String markName)
           
 void reset()
          Resets the current stack buffer to initial states.
 
Methods inherited from class com.voytechs.jnetstream.io.StackInputStream
hex, position, printStream, read, skip
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitStackInputStream

public BitStackInputStream(java.io.InputStream inputStream)
Parameters:
inputStream -

BitStackInputStream

public BitStackInputStream(java.io.InputStream inputStream,
                           int bufSize)
Parameters:
inputStream -
bufSize -
Method Detail

push

public void push(int bitsLeft)
Parameters:
bitsLeft -

push

public void push(int bitsLeft,
                 java.lang.String markName)
Parameters:
bitsLeft -
markName -

popOnBitBoundary

public int popOnBitBoundary()
Returns:

clear

public void clear()
           throws java.io.IOException
Description copied from class: StackInputStream
Clears the last entry on the stack without rewinding to the position on the entry being cleared.

Overrides:
clear in class StackInputStream
Throws:
java.io.IOException

reset

public void reset()
Resets the current stack buffer to initial states. Any pushed positions are cleared and offset and count are reset. The existing "buf" is not dealocated and reused for future stack usage.

Overrides:
reset in class StackInputStream

main

public static void main(java.lang.String[] args)
Test function for BitStackInputStream

Parameters:
args - command line arguments