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 boolean
private int
private int
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Unsupported.void
close()
This will close the underlying stream and release any resources.void
mark
(int readlimit) Unsupported.boolean
non supported interface methods.int
read()
This will read the next byte from the stream.int
read
(byte[] data, int offset, int len) This will read a chunk of data.void
reset()
Unsupported.long
skip
(long nValue) Unsupported.Methods inherited from class java.io.FilterInputStream
read
Methods 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:
read
in 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:
read
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
- If there is an error closing the underlying stream.
-
markSupported
public boolean markSupported()non supported interface methods.- Overrides:
markSupported
in classFilterInputStream
- Returns:
- False always.
-
skip
public long skip(long nValue) Unsupported.- Overrides:
skip
in classFilterInputStream
- Parameters:
nValue
- ignored.- Returns:
- Always zero.
-
available
public int available()Unsupported.- Overrides:
available
in classFilterInputStream
- Returns:
- Always zero.
-
mark
public void mark(int readlimit) Unsupported.- Overrides:
mark
in classFilterInputStream
- Parameters:
readlimit
- ignored.
-
reset
Unsupported.- Overrides:
reset
in classFilterInputStream
- Throws:
IOException
- telling that this is an unsupported action.
-