Package org.apache.pdfbox.filter
Class ASCII85InputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.pdfbox.filter.ASCII85InputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
This class represents an ASCII85 stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private byte[]private booleanprivate intprivate intprivate static final charprivate static final charprivate static final charprivate static final charprivate static final charprivate static final charprivate static final charFields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintUnsupported.voidclose()This will close the underlying stream and release any resources.voidmark(int readlimit) Unsupported.booleannon supported interface methods.intread()This will read the next byte from the stream.intread(byte[] data, int offset, int len) This will read a chunk of data.voidreset()Unsupported.longskip(long nValue) Unsupported.Methods inherited from class java.io.FilterInputStream
readMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
index
private int index -
n
private int n -
eof
private boolean eof -
ascii
private byte[] ascii -
b
private byte[] b -
TERMINATOR
private static final char TERMINATOR- See Also:
-
OFFSET
private static final char OFFSET- See Also:
-
NEWLINE
private static final char NEWLINE- See Also:
-
RETURN
private static final char RETURN- See Also:
-
SPACE
private static final char SPACE- See Also:
-
PADDING_U
private static final char PADDING_U- See Also:
-
Z
private static final char Z- See Also:
-
-
Constructor Details
-
ASCII85InputStream
ASCII85InputStream(InputStream is) Constructor.- Parameters:
is- The input stream to actually read from.
-
-
Method Details
-
read
This will read the next byte from the stream.- Overrides:
readin classFilterInputStream- Returns:
- The next byte read from the stream.
- Throws:
IOException- If there is an error reading from the wrapped stream.
-
read
This will read a chunk of data.- Overrides:
readin classFilterInputStream- Parameters:
data- The buffer to write data to.offset- The offset into the data stream.len- The number of byte to attempt to read.- Returns:
- The number of bytes actually read.
- Throws:
IOException- If there is an error reading data from the underlying stream.
-
close
This will close the underlying stream and release any resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException- If there is an error closing the underlying stream.
-
markSupported
public boolean markSupported()non supported interface methods.- Overrides:
markSupportedin classFilterInputStream- Returns:
- False always.
-
skip
public long skip(long nValue) Unsupported.- Overrides:
skipin classFilterInputStream- Parameters:
nValue- ignored.- Returns:
- Always zero.
-
available
public int available()Unsupported.- Overrides:
availablein classFilterInputStream- Returns:
- Always zero.
-
mark
public void mark(int readlimit) Unsupported.- Overrides:
markin classFilterInputStream- Parameters:
readlimit- ignored.
-
reset
Unsupported.- Overrides:
resetin classFilterInputStream- Throws:
IOException- telling that this is an unsupported action.
-