uk.co.mmscomputing.imageio.jpeg
Class JPEGHuffmanOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by uk.co.mmscomputing.imageio.jpeg.JPEGHuffmanOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class JPEGHuffmanOutputStream
extends java.io.OutputStream


Field Summary
protected  int[] BITS
           
protected  int[] EHUFCO
           
protected  int[] EHUFSI
           
protected  int[] HUFFCODE
           
protected  int[] HUFFSIZE
           
protected  int[] HUFFVAL
           
protected  int[] MAXCODE
           
protected  int[] MINCODE
           
protected  JPEGBitOutputStream out
           
protected  int[] VALPTR
           
 
Constructor Summary
JPEGHuffmanOutputStream(JPEGBitOutputStream out, java.io.InputStream tables)
           
 
Method Summary
 void flush()
           
 int getTableDataLength()
           
 void write(int b)
           
 void writeBits(int code, int size)
           
 void writeTableData(java.io.OutputStream tables)
           
 
Methods inherited from class java.io.OutputStream
close, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BITS

protected int[] BITS

HUFFVAL

protected int[] HUFFVAL

HUFFSIZE

protected int[] HUFFSIZE

HUFFCODE

protected int[] HUFFCODE

EHUFSI

protected int[] EHUFSI

EHUFCO

protected int[] EHUFCO

VALPTR

protected int[] VALPTR

MINCODE

protected int[] MINCODE

MAXCODE

protected int[] MAXCODE

out

protected JPEGBitOutputStream out
Constructor Detail

JPEGHuffmanOutputStream

public JPEGHuffmanOutputStream(JPEGBitOutputStream out,
                               java.io.InputStream tables)
                        throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getTableDataLength

public int getTableDataLength()

writeTableData

public void writeTableData(java.io.OutputStream tables)
                    throws java.io.IOException
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

writeBits

public void writeBits(int code,
                      int size)
               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.OutputStream
Throws:
java.io.IOException


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