Package gov.nih.mipav.model.file
Class FileTiff.JPEGInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- gov.nih.mipav.model.file.FileTiff.IntFilterInputStream
-
- gov.nih.mipav.model.file.FileTiff.JPEGInputStream
-
- All Implemented Interfaces:
FileTiff.JPEGConstants,java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- FileTiff
public class FileTiff.JPEGInputStream extends FileTiff.IntFilterInputStream implements FileTiff.JPEGConstants
-
-
Field Summary
Fields Modifier and Type Field Description protected FileTiff.JPEGHuffmanInputStream[]acinsprotected intbpsprotected FileTiff.JPEGComponentInputStream[]compinsprotected FileTiff.JPEGHuffmanInputStream[]dcinsprotected intheight(package private) FileTiff.JPEGBitInputStreaminprotected intmaxHorprotected intmaxVertprotected intmcuColsprotected intmcuHeightprotected intmcuRowsprotected intmcuWidthprivate int[][]qtsprotected intRiprotected FileTiff.JPEGComponentInputStream[]scaninsprotected intsppprotected intwidth-
Fields inherited from interface gov.nih.mipav.model.file.FileTiff.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
Constructors Constructor Description JPEGInputStream(java.io.InputStream input)JPEGInputStream(java.io.InputStream input, int[][] qts, FileTiff.JPEGHuffmanInputStream[] dcins, FileTiff.JPEGHuffmanInputStream[] acins)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapp0(java.io.InputStream in)voidapp1(java.io.InputStream in)voidapp10(java.io.InputStream in)voidapp11(java.io.InputStream in)voidapp12(java.io.InputStream in)voidapp13(java.io.InputStream in)voidapp14(java.io.InputStream in)voidapp15(java.io.InputStream in)voidapp2(java.io.InputStream in)voidapp3(java.io.InputStream in)voidapp4(java.io.InputStream in)voidapp5(java.io.InputStream in)voidapp6(java.io.InputStream in)voidapp7(java.io.InputStream in)voidapp8(java.io.InputStream in)voidapp9(java.io.InputStream in)voidcomment(java.io.InputStream in)voiddefineArithmeticConditioning(java.io.InputStream in)voiddefineHierarchicalProgression(java.io.InputStream in)voiddefineHuffmanTables(java.io.InputStream tables)voiddefineNumberOfLines(java.io.InputStream in)voiddefineQuantizationTables(java.io.InputStream in)voiddefineRestartInterval(java.io.InputStream in)protected voiddump(java.io.InputStream in)voidendOfImage()voidexpandReferenceComponents(java.io.InputStream in)FileTiff.JPEGHuffmanInputStream[]getACIns()FileTiff.JPEGHuffmanInputStream[]getDCIns()intgetHeight()intgetNumComponents()int[][]getQTs()intgetWidth()(package private) voidnormalize(int[] qt)intread()intread(byte[] buf, int off, int len)intread(int[] buf, int off, int len)protected intreadIn(java.io.InputStream in)voidrestartIntervalTermination(int no)voidstartOfFrame(java.io.InputStream in, int mode)voidstartOfImage()voidstartOfScan(java.io.InputStream in)-
Methods inherited from class gov.nih.mipav.model.file.FileTiff.IntFilterInputStream
read, setIn
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
-
-
-
Field Detail
-
bps
protected int bps
-
height
protected int height
-
width
protected int width
-
maxHor
protected int maxHor
-
maxVert
protected int maxVert
-
mcuHeight
protected int mcuHeight
-
mcuWidth
protected int mcuWidth
-
mcuRows
protected int mcuRows
-
mcuCols
protected int mcuCols
-
spp
protected int spp
-
qts
private int[][] qts
-
dcins
protected FileTiff.JPEGHuffmanInputStream[] dcins
-
acins
protected FileTiff.JPEGHuffmanInputStream[] acins
-
compins
protected FileTiff.JPEGComponentInputStream[] compins
-
scanins
protected FileTiff.JPEGComponentInputStream[] scanins
-
Ri
protected int Ri
-
-
Constructor Detail
-
JPEGInputStream
public JPEGInputStream(java.io.InputStream input) throws java.io.IOException- Throws:
java.io.IOException
-
JPEGInputStream
public JPEGInputStream(java.io.InputStream input, int[][] qts, FileTiff.JPEGHuffmanInputStream[] dcins, FileTiff.JPEGHuffmanInputStream[] acins) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
getQTs
public int[][] getQTs()
-
getDCIns
public FileTiff.JPEGHuffmanInputStream[] getDCIns()
-
getACIns
public FileTiff.JPEGHuffmanInputStream[] getACIns()
-
getHeight
public int getHeight()
-
getWidth
public int getWidth()
-
getNumComponents
public int getNumComponents()
-
readIn
protected int readIn(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
startOfFrame
public void startOfFrame(java.io.InputStream in, int mode) throws java.io.IOException- Throws:
java.io.IOException
-
defineHuffmanTables
public void defineHuffmanTables(java.io.InputStream tables) throws java.io.IOException- Throws:
java.io.IOException
-
defineArithmeticConditioning
public void defineArithmeticConditioning(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
restartIntervalTermination
public void restartIntervalTermination(int no) throws java.io.IOException- Throws:
java.io.IOException
-
startOfImage
public void startOfImage()
-
endOfImage
public void endOfImage()
-
startOfScan
public void startOfScan(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
defineQuantizationTables
public void defineQuantizationTables(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
normalize
void normalize(int[] qt)
-
defineNumberOfLines
public void defineNumberOfLines(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
defineRestartInterval
public void defineRestartInterval(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
defineHierarchicalProgression
public void defineHierarchicalProgression(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
expandReferenceComponents
public void expandReferenceComponents(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
dump
protected void dump(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app0
public void app0(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app1
public void app1(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app2
public void app2(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app3
public void app3(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app4
public void app4(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app5
public void app5(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app6
public void app6(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app7
public void app7(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app8
public void app8(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app9
public void app9(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app10
public void app10(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app11
public void app11(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app12
public void app12(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app13
public void app13(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app14
public void app14(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
app15
public void app15(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
comment
public void comment(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(int[] buf, int off, int len) throws java.io.IOException- Specified by:
readin classFileTiff.IntFilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] buf, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
-