uk.co.mmscomputing.imageio.jpeg
Class JPEGComponentInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by uk.co.mmscomputing.imageio.jpeg.JPEGComponentInputStream
All Implemented Interfaces:
java.io.Closeable

public class JPEGComponentInputStream
extends java.io.InputStream


Field Summary
protected  int bps
           
protected  int height
           
protected  int Hf
           
protected  int HMax
           
protected  int id
           
protected  JPEGDCTInputStream in
           
protected  int[] qt
           
protected  int shift
           
protected  int Vf
           
protected  int VMax
           
protected  int width
           
protected  int Xf
           
protected  int Yf
           
 
Constructor Summary
JPEGComponentInputStream(int id)
           
 
Method Summary
protected  void copyDataUnit(byte[] buf, int off, int maxy, int maxx, int[] buffer)
           
protected  void copyDataUnit(int[] buf, int off, int maxy, int maxx, int[] buffer)
           
protected  void copyPixel(byte[] buf, int off, int maxy, int maxx, int b)
           
protected  void copyPixel(int[] buf, int off, int maxy, int maxx, int b)
           
 int getId()
           
 int read()
           
 void read(byte[] buf, int off, int maxy, int maxx)
           
 void read(int[] buf, int off, int maxy, int maxx)
           
 void restart()
           
 void setBitsPerSample(int bps)
           
 void setDimensions(int h, int w)
           
 void setHuffmanTables(JPEGHuffmanInputStream dc, JPEGHuffmanInputStream ac)
           
 void setMaxSamplingRate(int VMax, int HMax)
           
 void setQuantizationTable(int[] qt)
           
 void setSamplingRate(int Vf, int Hf)
           
 void setShift(int shift)
           
 java.lang.String toString()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected int id

shift

protected int shift

height

protected int height

width

protected int width

bps

protected int bps

Hf

protected int Hf

Vf

protected int Vf

HMax

protected int HMax

VMax

protected int VMax

Yf

protected int Yf

Xf

protected int Xf

qt

protected int[] qt

in

protected JPEGDCTInputStream in
Constructor Detail

JPEGComponentInputStream

public JPEGComponentInputStream(int id)
Method Detail

getId

public int getId()

setShift

public void setShift(int shift)

setBitsPerSample

public void setBitsPerSample(int bps)

setDimensions

public void setDimensions(int h,
                          int w)

setSamplingRate

public void setSamplingRate(int Vf,
                            int Hf)

setMaxSamplingRate

public void setMaxSamplingRate(int VMax,
                               int HMax)

setQuantizationTable

public void setQuantizationTable(int[] qt)

setHuffmanTables

public void setHuffmanTables(JPEGHuffmanInputStream dc,
                             JPEGHuffmanInputStream ac)

restart

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

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

copyPixel

protected void copyPixel(int[] buf,
                         int off,
                         int maxy,
                         int maxx,
                         int b)

copyDataUnit

protected void copyDataUnit(int[] buf,
                            int off,
                            int maxy,
                            int maxx,
                            int[] buffer)
                     throws java.io.IOException
Throws:
java.io.IOException

read

public void read(int[] buf,
                 int off,
                 int maxy,
                 int maxx)
          throws java.io.IOException
Throws:
java.io.IOException

copyPixel

protected void copyPixel(byte[] buf,
                         int off,
                         int maxy,
                         int maxx,
                         int b)

copyDataUnit

protected void copyDataUnit(byte[] buf,
                            int off,
                            int maxy,
                            int maxx,
                            int[] buffer)
                     throws java.io.IOException
Throws:
java.io.IOException

read

public void read(byte[] buf,
                 int off,
                 int maxy,
                 int maxx)
          throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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