public class Stream extends Token
| Constructor and Description |
|---|
Stream()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
advanceTo(int offset)
Advances to a specified offset in the stream.
|
long |
getLength()
Returns the length of the stream.
|
long |
getOffset()
Returns the current offset in the stream.
|
void |
initRead(java.io.RandomAccessFile raf)
Prepares for reading the Stream.
|
int |
read()
Reads a byte from the Stream, applying the Filters if any.
|
int |
read(byte[] b)
Reads a sequence of bytes from the Stream, applying the
Filters if any.
|
int |
readAsciiInt()
Reads an ASCII string, which may be preceded by white space.
|
void |
setFilters(Filter[] filters)
Sets the array of filters used by the stream.
|
void |
setLength(long length)
Sets the length field.
|
void |
setOffset(long offset)
Sets the offset field.
|
long |
skipBytes(long n)
Skips a specified number of bytes in the stream.
|
isPdfACompliant, isSimpleTokenpublic long getLength()
public void setLength(long length)
public long getOffset()
public void setOffset(long offset)
public void setFilters(Filter[] filters)
public void initRead(java.io.RandomAccessFile raf)
throws java.io.IOException,
PdfException
java.io.IOExceptionPdfExceptionpublic int read()
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
java.io.IOExceptionpublic long skipBytes(long n)
throws java.io.IOException
java.io.IOExceptionpublic int readAsciiInt()
throws java.io.IOException,
PdfException
java.io.IOExceptionPdfExceptionpublic boolean advanceTo(int offset)
throws java.io.IOException
true
if the advance is successful, false if the
point has already been passed or some other failure occurs.java.io.IOException