Package org.apache.xmlgraphics.util.io
Class ASCII85InputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.xmlgraphics.util.io.ASCII85InputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ASCII85Constants
public class ASCII85InputStream extends java.io.InputStream implements ASCII85Constants
This class applies a ASCII85 decoding to the stream.The class is derived from InputStream instead of FilteredInputStream because we can use the read(byte[], int, int) method from InputStream which simply delegates to read(). This makes the implementation easier.
The filter is described in chapter 3.13.3 of the PostScript Language Reference (third edition).
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
b
private int
bIndex
private int
bSize
private boolean
eodReached
private java.io.InputStream
in
-
Fields inherited from interface org.apache.xmlgraphics.util.io.ASCII85Constants
END, EOD, EOL, POW85, START, ZERO, ZERO_ARRAY
-
-
Constructor Summary
Constructors Constructor Description ASCII85InputStream(java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
filteredRead()
private void
handleEOD()
int
read()
private void
readNextTuple()
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
FilterInputStream
-
filteredRead
private int filteredRead() throws java.io.IOException
- Throws:
java.io.IOException
-
handleEOD
private void handleEOD() throws java.io.IOException
- Throws:
java.io.IOException
-
readNextTuple
private void readNextTuple() throws java.io.IOException
- Throws:
java.io.IOException
-
-