com.lowagie.text.pdf
Class PRIndirectReference

java.lang.Object
  extended by com.lowagie.text.pdf.PdfObject
      extended by com.lowagie.text.pdf.PdfIndirectReference
          extended by com.lowagie.text.pdf.PRIndirectReference

public class PRIndirectReference
extends PdfIndirectReference


Field Summary
protected  PdfObject hardReference
          Used when 'reader' is "non-partial", holding the entire PDF in memory.
protected  PdfReader reader
           
 
Fields inherited from class com.lowagie.text.pdf.PdfIndirectReference
generation, number, reffedObj
 
Fields inherited from class com.lowagie.text.pdf.PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type
 
Constructor Summary
PRIndirectReference(PdfReader reader, int number)
          Constructs a PdfIndirectReference.
PRIndirectReference(PdfReader reader, int number, int generation)
          Constructs a PdfIndirectReference.
 
Method Summary
 PdfObject getDirectObject()
          Find the direct object for this reference.
private  PdfObject getInternalObject()
          Sorts out the current reference from either of the two places it could be stored.
 PdfReader getReader()
           
 void setDirectObject(PdfObject obj)
          Block alteration of a PRIndRef's direct object.
 void setNumber(int number, int generation)
           
 void toPdf(PdfWriter writer, OutputStream os)
          Writes the PDF representation of this PdfObject as an array of bytes to the writer.
 
Methods inherited from class com.lowagie.text.pdf.PdfIndirectReference
getGeneration, getNumber, toString
 
Methods inherited from class com.lowagie.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reader

protected PdfReader reader

hardReference

protected PdfObject hardReference
Used when 'reader' is "non-partial", holding the entire PDF in memory. Otherwise, we stick to PdfIndirectReference's "reffedObj".

Since:
2.1.5
Constructor Detail

PRIndirectReference

PRIndirectReference(PdfReader reader,
                    int number,
                    int generation)
Constructs a PdfIndirectReference.

Parameters:
reader - a PdfReader
number - the object number.
generation - the generation number.

PRIndirectReference

PRIndirectReference(PdfReader reader,
                    int number)
Constructs a PdfIndirectReference.

Parameters:
reader - a PdfReader
number - the object number.
Method Detail

toPdf

public void toPdf(PdfWriter writer,
                  OutputStream os)
           throws IOException
Description copied from class: PdfObject
Writes the PDF representation of this PdfObject as an array of bytes to the writer.

Overrides:
toPdf in class PdfObject
Parameters:
writer - for backwards compatibility
os - The OutputStream to write the bytes to.
Throws:
IOException

getReader

public PdfReader getReader()

setNumber

public void setNumber(int number,
                      int generation)

getDirectObject

public PdfObject getDirectObject()
Find the direct object for this reference. It'll look up the correct one from its PdfReader if need be, but prefers to use the internally stored PdfObject.

Overrides:
getDirectObject in class PdfIndirectReference
Returns:
the direct object for this reference.
Since:
2.1.5

getInternalObject

private PdfObject getInternalObject()
Sorts out the current reference from either of the two places it could be stored.

Returns:
a valid object reference if there's one to get
Since:
2.1.5

setDirectObject

public void setDirectObject(PdfObject obj)
Block alteration of a PRIndRef's direct object.

Overrides:
setDirectObject in class PdfIndirectReference
Parameters:
obj - ignored
Since:
2.1.5

Hosted by Hostbasket