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(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, isSimpleToken
public long getLength()
public void setLength(long length)
public long getOffset()
public void setOffset(long offset)
public void setFilters(Filter[] filters)
public void initRead(RandomAccessFile raf) throws IOException, PdfException
IOException
PdfException
public int read() throws IOException
IOException
public int read(byte[] b) throws IOException
IOException
public long skipBytes(long n) throws IOException
IOException
public int readAsciiInt() throws IOException, PdfException
IOException
PdfException
public boolean advanceTo(int offset) throws IOException
true
if the advance is successful, false
if the
point has already been passed or some other failure occurs.IOException
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.