MAM API
(developer's version)

Class BinaryInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by BinaryInputStream
All Implemented Interfaces:
Closeable

public class BinaryInputStream
extends InputStream

This output stream provides an eight bit long buffer for writing individual bits.


Field Summary
private  byte buffer
           
private  InputStream in
           
private  int pointer
           
 
Constructor Summary
BinaryInputStream(InputStream stream)
          Create a binary stream on the top of the given stream.
 
Method Summary
 int available()
           
 int nextBit()
           
 int read()
           
 int readBits(int count)
           
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

private InputStream in

buffer

private byte buffer

pointer

private int pointer
Constructor Detail

BinaryInputStream

public BinaryInputStream(InputStream stream)
Create a binary stream on the top of the given stream.

Method Detail

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

MAM API
(developer's version)

Copyright © 2007 Aija Niissalo, Marko Laakso, Markus Heinonen.