Package gov.nih.mipav.model.file
Class FileSVS.ModHuffmanInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- gov.nih.mipav.model.file.FileSVS.BitInputStream
-
- gov.nih.mipav.model.file.FileSVS.ModHuffmanInputStream
-
- All Implemented Interfaces:
FileSVS.ModHuffmanTable,java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
FileSVS.ModModREADInputStream
- Enclosing class:
- FileSVS
public class FileSVS.ModHuffmanInputStream extends FileSVS.BitInputStream implements FileSVS.ModHuffmanTable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFileSVS.ModHuffmanInputStream.ModHuffmanCodingException
-
Field Summary
Fields Modifier and Type Field Description protected intstate-
Fields inherited from class gov.nih.mipav.model.file.FileSVS.BitInputStream
count, nextByteMoreSignificant
-
Fields inherited from interface gov.nih.mipav.model.file.FileSVS.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 intcheckEOL()protected intfindToken(int[][] table)intgetColour(int colwhite)intgetState()intread()intread(byte[] b)intread(byte[] b, int off, int len)private intread(int[][] makeUp, int maxmakeUp, int[][] term, int maxterm)voidreadEOL()voidskipPadding(int bits)voidsyncWithEOL()-
Methods inherited from class gov.nih.mipav.model.file.FileSVS.BitInputStream
availableBits, cbCount, clrBits, getBits, needBits, readBit, readBits, reset, setNextByteMoreSignificant
-
-
-
-
Method Detail
-
skipPadding
public void skipPadding(int bits) throws java.io.IOException- Overrides:
skipPaddingin classFileSVS.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:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin 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
-
-