com.lowagie.text.pdf

## Class PdfIndirectObject

- java.lang.Object
- - com.lowagie.text.pdf.PdfIndirectObject

-     public class PdfIndirectObject
      extends java.lang.Object

  `PdfIndirectObject` is the Pdf indirect object.

  An indirect object is an object that has been labeled so that it can be referenced by other objects. Any type of `PdfObject` may be labeled as an indirect object.
  An indirect object consists of an object identifier, a direct object, and the endobj keyword. The object identifier consists of an integer object number, an integer generation number, and the obj keyword.
  This object is described in the 'Portable Document Format Reference Manual version 1.7' section 3.2.9 (page 63-65).

  See Also:
    `PdfObject`, `PdfIndirectReference`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) static byte[]` | `ENDOBJ`
    `protected int` | `generation` the generation number
    `protected int` | `number` The object number
    `(package private) PdfObject` | `object`
    `(package private) static int` | `SIZEOBJ`
    `(package private) static byte[]` | `STARTOBJ`
    `(package private) PdfWriter` | `writer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PdfIndirectObject(int number, int generation, PdfObject object, PdfWriter writer)` Constructs a `PdfIndirectObject`.
    `PdfIndirectObject(int number, PdfObject object, PdfWriter writer)` Constructs a `PdfIndirectObject`.
    `PdfIndirectObject(PdfIndirectReference ref, PdfObject object, PdfWriter writer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PdfIndirectReference` | `getIndirectReference()` Returns a `PdfIndirectReference` to this `PdfIndirectObject`.
    `(package private) void` | `writeTo(java.io.OutputStream os)` Writes efficiently to a stream

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### number

          protected int number

      The object number

    - #### generation

          protected int generation

      the generation number

    - #### STARTOBJ

          static final byte[] STARTOBJ

    - #### ENDOBJ

          static final byte[] ENDOBJ

    - #### SIZEOBJ

          static final int SIZEOBJ

    - #### object

          PdfObject object

    - #### writer

          PdfWriter writer

  - ### Constructor Detail

    - #### PdfIndirectObject

          PdfIndirectObject(int number,
                           PdfObject object,
                           PdfWriter writer)

      Constructs a `PdfIndirectObject`.
      Parameters:
        `number` - the object number
        `object` - the direct object

    - #### PdfIndirectObject

          PdfIndirectObject(PdfIndirectReference ref,
                           PdfObject object,
                           PdfWriter writer)

    - #### PdfIndirectObject

          PdfIndirectObject(int number,
                           int generation,
                           PdfObject object,
                           PdfWriter writer)

      Constructs a `PdfIndirectObject`.
      Parameters:
        `number` - the object number
        `generation` - the generation number
        `object` - the direct object

  - ### Method Detail

    - #### getIndirectReference

          public PdfIndirectReference getIndirectReference()

      Returns a `PdfIndirectReference` to this `PdfIndirectObject`.
      Returns:
        a `PdfIndirectReference`

    - #### writeTo

          void writeTo(java.io.OutputStream os)
                 throws java.io.IOException

      Writes efficiently to a stream
      Parameters:
        `os` - the stream to write to
      Throws:
        `java.io.IOException` - on write error