|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.hul.ois.jhove.module.pdf.Token
edu.harvard.hul.ois.jhove.module.pdf.Stream
public class Stream
Class to encapsulate a stream token. The content of the stream is not saved, only its length and starting offset.
Constructor Summary | |
---|---|
Stream()
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class edu.harvard.hul.ois.jhove.module.pdf.Token |
---|
isPdfACompliant, isSimpleToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stream()
Method Detail |
---|
public 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.IOException
PdfException
public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] b) throws java.io.IOException
java.io.IOException
public long skipBytes(long n) throws java.io.IOException
java.io.IOException
public int readAsciiInt() throws java.io.IOException, PdfException
java.io.IOException
PdfException
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |