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[]
acins
protected int
bps
protected FileTiff.JPEGComponentInputStream[]
compins
protected FileTiff.JPEGHuffmanInputStream[]
dcins
protected int
height
(package private) FileTiff.JPEGBitInputStream
in
protected int
maxHor
protected int
maxVert
protected int
mcuCols
protected int
mcuHeight
protected int
mcuRows
protected int
mcuWidth
private int[][]
qts
protected int
Ri
protected FileTiff.JPEGComponentInputStream[]
scanins
protected int
spp
protected int
width
-
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 void
app0(java.io.InputStream in)
void
app1(java.io.InputStream in)
void
app10(java.io.InputStream in)
void
app11(java.io.InputStream in)
void
app12(java.io.InputStream in)
void
app13(java.io.InputStream in)
void
app14(java.io.InputStream in)
void
app15(java.io.InputStream in)
void
app2(java.io.InputStream in)
void
app3(java.io.InputStream in)
void
app4(java.io.InputStream in)
void
app5(java.io.InputStream in)
void
app6(java.io.InputStream in)
void
app7(java.io.InputStream in)
void
app8(java.io.InputStream in)
void
app9(java.io.InputStream in)
void
comment(java.io.InputStream in)
void
defineArithmeticConditioning(java.io.InputStream in)
void
defineHierarchicalProgression(java.io.InputStream in)
void
defineHuffmanTables(java.io.InputStream tables)
void
defineNumberOfLines(java.io.InputStream in)
void
defineQuantizationTables(java.io.InputStream in)
void
defineRestartInterval(java.io.InputStream in)
protected void
dump(java.io.InputStream in)
void
endOfImage()
void
expandReferenceComponents(java.io.InputStream in)
FileTiff.JPEGHuffmanInputStream[]
getACIns()
FileTiff.JPEGHuffmanInputStream[]
getDCIns()
int
getHeight()
int
getNumComponents()
int[][]
getQTs()
int
getWidth()
(package private) void
normalize(int[] qt)
int
read()
int
read(byte[] buf, int off, int len)
int
read(int[] buf, int off, int len)
protected int
readIn(java.io.InputStream in)
void
restartIntervalTermination(int no)
void
startOfFrame(java.io.InputStream in, int mode)
void
startOfImage()
void
startOfScan(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:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
read
public int read(int[] buf, int off, int len) throws java.io.IOException
- Specified by:
read
in classFileTiff.IntFilterInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] buf, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
-