Class PdfIndirectReference

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    PRIndirectReference

    public class PdfIndirectReference
    extends PdfObject
    PdfIndirectReference contains a reference to a PdfIndirectObject.

    Any object used as an element of an array or as a value in a dictionary may be specified by either a direct object of an indirect reference. An indirect reference is a reference to an indirect object, and consists of the indirect object's object number, generation number and the R keyword.
    This object is described in the 'Portable Document Format Reference Manual version 1.3' section 4.11 (page 54).

    See Also:
    PdfObject, PdfIndirectObject, Serialized Form
    • Field Detail

      • number

        protected int number
        the object number
      • generation

        protected int generation
        the generation number
    • Constructor Detail

      • PdfIndirectReference

        protected PdfIndirectReference()
      • PdfIndirectReference

        PdfIndirectReference​(int type,
                             int number,
                             int generation)
        Constructs a PdfIndirectReference.
        Parameters:
        type - the type of the PdfObject that is referenced to
        number - the object number.
        generation - the generation number.
      • PdfIndirectReference

        protected PdfIndirectReference​(int type,
                                       int number)
        Constructs a PdfIndirectReference.
        Parameters:
        type - the type of the PdfObject that is referenced to
        number - the object number.
    • Method Detail

      • getNumber

        public int getNumber()
        Returns the number of the object.
        Returns:
        a number.
      • getGeneration

        public int getGeneration()
        Returns the generation of the object.
        Returns:
        a number.
      • toString

        public java.lang.String toString()
        Description copied from class: PdfObject
        Returns the String-representation of this PdfObject.
        Overrides:
        toString in class PdfObject
        Returns:
        a String
      • toPdf

        public void toPdf​(PdfWriter writer,
                          java.io.OutputStream os)
                   throws java.io.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:
        java.io.IOException