public class CrossRefStream extends 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 |
getCrossRefTableSize()
Returns the total number of objects in the document's
cross-reference table at the time this stream was written.
|
int |
getFreeCount()
Returns the number of free objects detected.
|
int |
getObjNum()
Returns number of the last object read by
readNextObject () . |
int |
getOffset()
Returns the offset of the last object read.
|
long |
getPrevXref()
Returns the offset of the previous cross-reference stream,
or -1 if none is specified.
|
void |
initRead(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(RandomAccessFile raf) throws IOException, PdfException
IOException
PdfException
public boolean readNextObject() throws 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.IOException
public 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 getCrossRefTableSize()
public int getOffset()
public int getContentStreamObjNum()
public long getPrevXref()
public int getContentStreamIndex()
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.