public class CrossRefStream
extends java.lang.Object
| Constructor and Description |
|---|
CrossRefStream(PdfStream xstrm)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getContentStreamIndex()
Returns the content stream index of the last object read.
|
int |
getContentStreamObjNum()
Returns the object number of the content stream in
which this object is stored.
|
int |
getFreeCount()
Returns the number of free objects detected.
|
int |
getNumObjects()
Returns the total object count.
|
int |
getObjNum()
Returns number of the last object read by
readNextObject (). |
int |
getOffset()
Returns the offset of the last object object read.
|
long |
getPrevXref()
Returns the offset of the previous cross-reference stream,
or -1 if none is specified.
|
void |
initRead(java.io.RandomAccessFile raf)
Prepares for reading the Stream.
|
boolean |
isObjCompressed()
Returns
true if the last object read by
readNextObject () is a compressed object. |
boolean |
isValid()
Returns
true if the PdfStream object meets
the requirements of a cross-reference stream. |
boolean |
readNextObject()
Reads the next object in the stream.
|
public CrossRefStream(PdfStream xstrm)
xstrm - PdfStream object which contains a presumed
cross-reference stream.public boolean isValid()
true if the PdfStream object meets
the requirements of a cross-reference stream. Also extracts
information from the dictionary for subsequent processing.public void initRead(java.io.RandomAccessFile raf)
throws java.io.IOException,
PdfException
java.io.IOExceptionPdfExceptionpublic boolean readNextObject()
throws java.io.IOException
readObject, it is possible to
call accessors to get information about the object.
For the moment, we
punt on the question of how to deal with Object Streams.
Free objects are skipped over while being counted. After
readNextObject() returns false, the caller
may call getFreeCount() to determine the
number of free objects.true if there is an object, false
if no more objects are available.java.io.IOExceptionpublic int getObjNum()
readNextObject ().
Do not call if readNextObject ()
returns false.public boolean isObjCompressed()
true if the last object read by
readNextObject () is a compressed object.
Do not call if readNextObject ()
returns false.public int getFreeCount()
readNextObject returns
false, signifying that all the objects
have been read and all the free objects counted.public int getNumObjects()
public int getOffset()
public int getContentStreamObjNum()
public long getPrevXref()
public int getContentStreamIndex()