com.voytechs.jnetstream.io
Class BitStackInputStream
java.lang.Object
java.io.InputStream
com.voytechs.jnetstream.io.StackInputStream
com.voytechs.jnetstream.io.BitStackInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class BitStackInputStream
- extends StackInputStream
todo comment this class :)
|
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 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 |
BitStackInputStream
public BitStackInputStream(java.io.InputStream inputStream)
- Parameters:
inputStream -
BitStackInputStream
public BitStackInputStream(java.io.InputStream inputStream,
int bufSize)
- Parameters:
inputStream - bufSize -
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