Package gov.nih.mipav.model.file
Class FileTiff.ModHuffmanInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- gov.nih.mipav.model.file.FileTiff.BitInputStream
-
- gov.nih.mipav.model.file.FileTiff.ModHuffmanInputStream
-
- All Implemented Interfaces:
FileTiff.ModHuffmanTable
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
FileTiff.ModModREADInputStream
- Enclosing class:
- FileTiff
public class FileTiff.ModHuffmanInputStream extends FileTiff.BitInputStream implements FileTiff.ModHuffmanTable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FileTiff.ModHuffmanInputStream.ModHuffmanCodingException
-
Field Summary
Fields Modifier and Type Field Description protected int
state
-
Fields inherited from class gov.nih.mipav.model.file.FileTiff.BitInputStream
count, nextByteMoreSignificant
-
Fields inherited from interface gov.nih.mipav.model.file.FileTiff.ModHuffmanTable
BLACK, EOL, EOLCW, makeUpBlack, makeUpWhite, MAXCHUNK, termBlack, termWhite, WHITE
-
-
Constructor Summary
Constructors Constructor Description ModHuffmanInputStream(java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
checkEOL()
protected int
findToken(int[][] table)
int
getColour(int colwhite)
int
getState()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
private int
read(int[][] makeUp, int maxmakeUp, int[][] term, int maxterm)
void
readEOL()
void
skipPadding(int bits)
void
syncWithEOL()
-
Methods inherited from class gov.nih.mipav.model.file.FileTiff.BitInputStream
availableBits, cbCount, clrBits, getBits, needBits, readBit, readBits, reset, setNextByteMoreSignificant
-
-
-
-
Method Detail
-
skipPadding
public void skipPadding(int bits) throws java.io.IOException
- Overrides:
skipPadding
in classFileTiff.BitInputStream
- Throws:
java.io.IOException
-
syncWithEOL
public void syncWithEOL() throws java.io.IOException
- Throws:
java.io.IOException
-
readEOL
public void readEOL() throws java.io.IOException
- Throws:
java.io.IOException
-
getState
public int getState()
-
getColour
public int getColour(int colwhite)
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
read
private int read(int[][] makeUp, int maxmakeUp, int[][] term, int maxterm) throws java.io.IOException
- Throws:
java.io.IOException
-
findToken
protected int findToken(int[][] table)
-
checkEOL
protected int checkEOL() throws java.io.IOException
- Throws:
java.io.IOException
-
-