Package 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:
java.lang.Comparable<XReferenceEntry>,XReferenceEntry
public class FreeXReference extends AbstractXReference
A class representing a free reference in a PDF's crossreference stream (PDFXRefStream).
-
-
Field Summary
Fields Modifier and Type Field Description private COSObjectKeykeyprivate longnextFreeObjectstatic FreeXReferenceNULL_ENTRY
-
Constructor Summary
Constructors Constructor Description FreeXReference(COSObjectKey key, long nextFreeObject)Sets the givenCOSObjectKeyas a free reference in a PDF's crossreference stream (PDFXRefStream).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSObjectKeygetReferencedKey()Returns theCOSObjectKeyof the object, that is described by this crossreference stream entry.longgetSecondColumnValue()Returns the value for the second column of the crossreference stream entry.longgetThirdColumnValue()Returns the value for the third column of the crossreference stream entry.java.lang.StringtoString()Returns a string representation of this crossreference stream entry.-
Methods inherited from class org.apache.pdfbox.pdfparser.xref.AbstractXReference
compareTo, getFirstColumnValue, getType
-
-
-
-
Field Detail
-
NULL_ENTRY
public static final FreeXReference NULL_ENTRY
-
key
private final COSObjectKey key
-
nextFreeObject
private final long nextFreeObject
-
-
Constructor Detail
-
FreeXReference
public FreeXReference(COSObjectKey key, long nextFreeObject)
Sets the givenCOSObjectKeyas 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 theCOSObjectKeyof the object, that is described by this crossreference stream entry.- Returns:
- The
COSObjectKeyof 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 freeCOSObjectKey- 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 freeCOSObjectKey- for entries of this type.)- Returns:
- The value for the third column of the crossreference stream entry.
-
toString
public java.lang.String toString()
Returns a string representation of this crossreference stream entry.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of this crossreference stream entry.
-
-