com.lowagie.text.pdf

## Class PdfWriter.PdfBody.PdfCrossReference

- java.lang.Object
- - com.lowagie.text.pdf.PdfWriter.PdfBody.PdfCrossReference

- All Implemented Interfaces:
    java.lang.Comparable
  Enclosing class:
    PdfWriter.PdfBody

      static class PdfWriter.PdfBody.PdfCrossReference
      extends java.lang.Object
      implements java.lang.Comparable

  `PdfCrossReference` is an entry in the PDF Cross-Reference table.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `generation` generation of the object.
    `private int` | `offset` Byte offset in the PDF file.
    `private int` | `refnum`
    `private int` | `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PdfWriter.PdfBody.PdfCrossReference(int refnum, int offset)` Constructs a cross-reference element for a PdfIndirectObject.
    `PdfWriter.PdfBody.PdfCrossReference(int refnum, int offset, int generation)` Constructs a cross-reference element for a PdfIndirectObject.
    `PdfWriter.PdfBody.PdfCrossReference(int type, int refnum, int offset, int generation)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(java.lang.Object o)`
    `boolean` | `equals(java.lang.Object obj)`
    `(package private) int` | `getRefnum()`
    `int` | `hashCode()`
    `void` | `toPdf(int midSize, java.io.OutputStream os)` Writes PDF syntax to the OutputStream
    `void` | `toPdf(java.io.OutputStream os)` Returns the PDF representation of this `PdfObject`.

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

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

- - ### Field Detail

    - #### type

          private int type

    - #### offset

          private int offset

      Byte offset in the PDF file.

    - #### refnum

          private int refnum

    - #### generation

          private int generation

      generation of the object.

  - ### Constructor Detail

    - #### PdfWriter.PdfBody.PdfCrossReference

          PdfWriter.PdfBody.PdfCrossReference(int refnum,
                                             int offset,
                                             int generation)

      Constructs a cross-reference element for a PdfIndirectObject.
      Parameters:
        `refnum` -
        `offset` - byte offset of the object
        `generation` - generation number of the object

    - #### PdfWriter.PdfBody.PdfCrossReference

          PdfWriter.PdfBody.PdfCrossReference(int refnum,
                                             int offset)

      Constructs a cross-reference element for a PdfIndirectObject.
      Parameters:
        `refnum` -
        `offset` - byte offset of the object

    - #### PdfWriter.PdfBody.PdfCrossReference

          PdfWriter.PdfBody.PdfCrossReference(int type,
                                             int refnum,
                                             int offset,
                                             int generation)

  - ### Method Detail

    - #### getRefnum

          int getRefnum()

    - #### toPdf

          public void toPdf(java.io.OutputStream os)
                     throws java.io.IOException

      Returns the PDF representation of this `PdfObject`.
      Parameters:
        `os` -
      Throws:
        `java.io.IOException`

    - #### toPdf

          public void toPdf(int midSize,
                   java.io.OutputStream os)
                     throws java.io.IOException

      Writes PDF syntax to the OutputStream
      Parameters:
        `midSize` -
        `os` -
      Throws:
        `java.io.IOException`

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`
      See Also:
        `Comparable.compareTo(java.lang.Object)`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`
      See Also:
        `Object.equals(java.lang.Object)`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`
      See Also:
        `Object.hashCode()`