| 
 | |||||||||
| 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.CrossRefStream
public class CrossRefStream
This class implements the Cross-Reference Stream, an alternative to the Cross-Reference Table starting in PDF 1.4. A cross-reference stream is identified by a startxref keyword, as opposed to the xref keyword which identifies the old-style cross-reference table. JHOVE supports only FlateDecode as a filter for cross-reference streams. This is consistent with the implementation limitation described in Appendix H of the PDF manual for Acrobat 6 and earlier.
| Constructor Summary | |
|---|---|
| CrossRefStream(PdfStream xstrm)Constructor. | |
| Method Summary | |
|---|---|
|  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 trueif the last object read byreadNextObject ()is a compressed object. | 
|  boolean | isValid()Returns trueif the PdfStream object meets
   the requirements of a cross-reference stream. | 
|  boolean | readNextObject()Reads the next object in the stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public CrossRefStream(PdfStream xstrm)
xstrm - PdfStream object which contains a presumed
          cross-reference stream.| Method Detail | 
|---|
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.IOException
PdfException
public 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.
- 
- Returns:
- trueif there is an object,- falseif no more objects are available.
- Throws:
- java.io.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 getNumObjects()
public int getOffset()
public int getContentStreamObjNum()
public long getPrevXref()
public int getContentStreamIndex()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||