uk.co.mmscomputing.io
Class BitOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by uk.co.mmscomputing.io.BitOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable
Direct Known Subclasses:
ModHuffmanOutputStream

public class BitOutputStream
extends java.io.FilterOutputStream


Field Summary
protected  int count
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
BitOutputStream()
           
BitOutputStream(java.io.OutputStream out)
           
 
Method Summary
protected  void cbLength(int len)
           
 void close()
           
 void flush()
           
 void pad()
           
 void reset()
           
 byte[] toByteArray()
           
 void write(int bit)
           
 void write(int code, int bitCount)
           
 
Methods inherited from class java.io.FilterOutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

protected int count
Constructor Detail

BitOutputStream

public BitOutputStream()

BitOutputStream

public BitOutputStream(java.io.OutputStream out)
Method Detail

cbLength

protected void cbLength(int len)
                 throws java.io.IOException
Throws:
java.io.IOException

write

public void write(int bit)
           throws java.io.IOException
Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException

write

public void write(int code,
                  int bitCount)
           throws java.io.IOException
Throws:
java.io.IOException

pad

public void pad()
         throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.FilterOutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterOutputStream
Throws:
java.io.IOException

toByteArray

public byte[] toByteArray()
                   throws java.io.IOException
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011 Direcció General de Tecnologia i Comunicacions. Govern de les Illes Balears. All Rights Reserved.