Package gov.nih.mipav.model.file
Class FileTiff.JPEGHuffmanInputStream
- java.lang.Object
-
- java.io.InputStream
-
- gov.nih.mipav.model.file.FileTiff.JPEGHuffmanInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- FileTiff
public class FileTiff.JPEGHuffmanInputStream extends java.io.InputStream
-
-
Constructor Summary
Constructors Constructor Description JPEGHuffmanInputStream(FileTiff.JPEGBitInputStream in, java.io.InputStream tables)
JPEGHuffmanInputStream(java.io.InputStream tables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
generateCodeTable(int LASTK)
private void
generateDecoderTable()
private void
generateSizeTable(int LASTK)
private void
initialize(java.io.InputStream tables)
int
read()
int
readBits(int bitSize)
private int
readTableData(java.io.InputStream tables)
void
restart()
void
setInputStream(FileTiff.JPEGBitInputStream in)
java.lang.String
toString()
-
-
-
Field Detail
-
BITS
protected int[] BITS
-
HUFFVAL
protected int[] HUFFVAL
-
HUFFSIZE
protected int[] HUFFSIZE
-
HUFFCODE
protected int[] HUFFCODE
-
VALPTR
protected int[] VALPTR
-
MINCODE
protected int[] MINCODE
-
MAXCODE
protected int[] MAXCODE
-
in
protected FileTiff.JPEGBitInputStream in
-
code
private int code
-
index
private int index
-
-
Constructor Detail
-
JPEGHuffmanInputStream
public JPEGHuffmanInputStream(FileTiff.JPEGBitInputStream in, java.io.InputStream tables) throws java.io.IOException
- Throws:
java.io.IOException
-
JPEGHuffmanInputStream
public JPEGHuffmanInputStream(java.io.InputStream tables) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
setInputStream
public void setInputStream(FileTiff.JPEGBitInputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
initialize
private void initialize(java.io.InputStream tables) throws java.io.IOException
- Throws:
java.io.IOException
-
readTableData
private int readTableData(java.io.InputStream tables) throws java.io.IOException
- Throws:
java.io.IOException
-
generateSizeTable
private void generateSizeTable(int LASTK)
-
generateCodeTable
private void generateCodeTable(int LASTK)
-
generateDecoderTable
private void generateDecoderTable()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
readBits
public int readBits(int bitSize) throws java.io.IOException
- Throws:
java.io.IOException
-
restart
public void restart() throws java.io.IOException
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-