org.apache.pdfbox.pdfparser.xref

## Class NormalXReference

- java.lang.Object
- - org.apache.pdfbox.pdfparser.xref.AbstractXReference
  - - org.apache.pdfbox.pdfparser.xref.NormalXReference

All Implemented Interfaces:
  Comparable<XReferenceEntry>, XReferenceEntry

    public class NormalXReference
    extends AbstractXReference

A class representing a normal reference in a PDF's crossreference stream (`PDFXRefStream`).

Author:
  Christian Appl

### Constructor Summary

Constructors
Constructor and Description
`NormalXReference(long byteOffset, COSObjectKey key, COSBase object)` Prepares a normal reference for the given `COSObject` in a PDF's crossreference stream (`PDFXRefStream`).

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getByteOffset()` Returns the byte offset of the `COSObject` in the PDF file.
`COSBase` `getObject()` Returns the `COSObject`, that is described by this crossreference stream entry.
`COSObjectKey` `getReferencedKey()` Returns the `COSObjectKey` of the object, that is described by this crossreference stream entry.
`long` `getSecondColumnValue()` Returns the value for the second column of the crossreference stream entry.
`long` `getThirdColumnValue()` Returns the value for the third column of the crossreference stream entry.
`boolean` `isObjectStream()` Returns true, if the referenced object is an object stream.
`String` `toString()` Returns a string representation of this crossreference stream entry.

### Methods inherited from class org.apache.pdfbox.pdfparser.xref.AbstractXReference

`compareTo, getFirstColumnValue, getType`

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

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

### Constructor Detail

#### NormalXReference

    public NormalXReference(long byteOffset,
                            COSObjectKey key,
                            COSBase object)

Prepares a normal reference for the given `COSObject` in a PDF's crossreference stream (`PDFXRefStream`).

Parameters:
  `byteOffset` - The byte offset of the `COSObject` in the PDF file.
  `key` - The `COSObjectKey`, that is represented by this entry.
  `object` - The `COSObject`, that is represented by this entry.

### Method Detail

#### getByteOffset

    public long getByteOffset()

Returns the byte offset of the `COSObject` in the PDF file.

Returns:
  The byte offset of the `COSObject` in the PDF file.

#### getReferencedKey

    public COSObjectKey getReferencedKey()

Returns the `COSObjectKey` of the object, that is described by this crossreference stream entry.

Returns:
  The `COSObjectKey` of the object, that is described by this crossreference stream entry.

#### getObject

    public COSBase getObject()

Returns the `COSObject`, that is described by this crossreference stream entry.

Returns:
  The `COSObject`, that is described by this crossreference stream entry.

#### isObjectStream

    public boolean isObjectStream()

Returns true, if the referenced object is an object stream.

Returns:
  True, if the referenced object is an object stream.

#### getSecondColumnValue

    public long getSecondColumnValue()

Returns the value for the second column of the crossreference stream entry. (This is byte offset of the `COSObject` in the PDF file - for entries of this type.)

Returns:
  The value for the second column of the crossreference stream entry.

#### getThirdColumnValue

    public long getThirdColumnValue()

Returns the value for the third column of the crossreference stream entry. (This is the generation number of the set `COSObjectKey` - for entries of this type.)

Returns:
  The value for the third column of the crossreference stream entry.

#### toString

    public String toString()

Returns a string representation of this crossreference stream entry.

Overrides:
  `toString` in class `Object`
Returns:
  A string representation of this crossreference stream entry.