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).
  • Field Details

    • NULL_ENTRY

      public static final FreeXReference NULL_ENTRY
    • key

      private final COSObjectKey key
    • nextFreeObject

      private final long nextFreeObject
  • Constructor Details

    • 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 Details

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