org.apache.pdfbox.pdfparser.xref

## Class FreeXReference

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

All Implemented Interfaces:
  Comparable<XReferenceEntry>, XReferenceEntry

    public class FreeXReference
    extends AbstractXReference

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

Author:
  Christian Appl

### Field Summary

Fields
`static FreeXReference` `NULL_ENTRY`

### Constructor Summary

Constructors
Constructor and Description
`FreeXReference(COSObjectKey key, long nextFreeObject)` Sets the given `COSObjectKey` as a free reference in a PDF's crossreference stream (`PDFXRefStream`).

### Method Summary

All Methods Instance Methods Concrete Methods
`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.
`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`

### Field Detail

#### NULL_ENTRY

    public static final FreeXReference NULL_ENTRY

### Constructor Detail

#### FreeXReference

    public FreeXReference(COSObjectKey key,
                          long nextFreeObject)

Sets the given `COSObjectKey` as a free reference in a PDF's crossreference stream (`PDFXRefStream`).

Parameters:
  `key` - The key, that shall be set as the free reference of the document.
  `nextFreeObject` - The object number of the next free object.

### Method Detail

#### 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.

#### getSecondColumnValue

    public long getSecondColumnValue()

Returns the value for the second column of the crossreference stream entry. (This is the object number of the set next free `COSObjectKey` - 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 next free `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.