Class BinaryInputStream
java.lang.Object
java.io.InputStream
BinaryInputStream
- All Implemented Interfaces:
- Closeable
public class BinaryInputStream
- extends InputStream
This output stream provides an eight bit long buffer
for writing individual bits.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
private InputStream in
buffer
private byte buffer
pointer
private int pointer
BinaryInputStream
public BinaryInputStream(InputStream stream)
- Create a binary stream on the top of the given stream.
available
public int available()
throws IOException
- Overrides:
available
in class InputStream
- Throws:
IOException
nextBit
public int nextBit()
throws IOException
- Throws:
IOException
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
readBits
public int readBits(int count)
throws IOException
- Throws:
IOException
Copyright © 2007 Aija Niissalo, Marko Laakso, Markus Heinonen.