uk.co.mmscomputing.imageio.jpeg
Class JPEGOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by uk.co.mmscomputing.imageio.jpeg.JPEGOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, JPEGConstants
Direct Known Subclasses:
JFIFOutputStream

public class JPEGOutputStream
extends java.io.OutputStream
implements JPEGConstants


Field Summary
protected  JPEGHuffmanOutputStream[] acouts
           
protected  JPEGHuffmanOutputStream[] dcouts
           
protected  int[][] qts
           
 
Fields inherited from interface uk.co.mmscomputing.imageio.jpeg.JPEGConstants
APP0, APP1, APP10, APP11, APP12, APP13, APP14, APP15, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9, COM, CQT, CQT2, DAC, DCTBlockSize, DCTSize, DHP, DHT, DNL, DQT, DRI, EOI, EXP, HCACTable, HCDCTable, HLACTable, HLDCTable, IZigZagTable, JPG, JPG0, JPG1, JPG10, JPG11, JPG12, JPG13, JPG2, JPG3, JPG4, JPG5, JPG6, JPG7, JPG8, JPG9, LQT, LQT2, MARK, RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7, SOF0, SOF1, SOF10, SOF11, SOF13, SOF14, SOF15, SOF2, SOF3, SOF5, SOF6, SOF7, SOF9, SOI, SOS, TEM, ZigZagTable
 
Constructor Summary
JPEGOutputStream(java.io.OutputStream out)
           
 
Method Summary
 void close()
           
 void defineHuffmanTables()
           
 void defineQuantizationTables()
           
 void endOfImage()
           
 void flush()
           
 void setRawACHuffmanTable(int index, byte[] table)
           
 void setRawDCHuffmanTable(int index, byte[] table)
           
 void setZZQuantizationTable(int index, int[] qt)
           
 void setZZQuantizationTable(int index, int[] qt, int quality)
           
 void startOfFrame(int height, int width, int[] HV, int[] Q)
           
 void startOfImage()
           
 void startOfScan(int[] sel)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qts

protected int[][] qts

dcouts

protected JPEGHuffmanOutputStream[] dcouts

acouts

protected JPEGHuffmanOutputStream[] acouts
Constructor Detail

JPEGOutputStream

public JPEGOutputStream(java.io.OutputStream out)
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

setZZQuantizationTable

public void setZZQuantizationTable(int index,
                                   int[] qt)

setZZQuantizationTable

public void setZZQuantizationTable(int index,
                                   int[] qt,
                                   int quality)

setRawDCHuffmanTable

public void setRawDCHuffmanTable(int index,
                                 byte[] table)
                          throws java.io.IOException
Throws:
java.io.IOException

setRawACHuffmanTable

public void setRawACHuffmanTable(int index,
                                 byte[] table)
                          throws java.io.IOException
Throws:
java.io.IOException

startOfFrame

public void startOfFrame(int height,
                         int width,
                         int[] HV,
                         int[] Q)
                  throws java.io.IOException
Throws:
java.io.IOException

defineHuffmanTables

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

startOfImage

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

endOfImage

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

defineQuantizationTables

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

startOfScan

public void startOfScan(int[] sel)
                 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

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

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close 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.