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:
Comparable<XReferenceEntry>,XReferenceEntry
A class representing a free reference in a PDF's crossreference stream (
PDFXRefStream).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final COSObjectKeyprivate final longstatic final FreeXReference -
Constructor Summary
ConstructorsConstructorDescriptionFreeXReference(COSObjectKey key, long nextFreeObject) Sets the givenCOSObjectKeyas a free reference in a PDF's crossreference stream (PDFXRefStream). -
Method Summary
Modifier and TypeMethodDescriptionReturns theCOSObjectKeyof the object, that is described by this crossreference stream entry.longReturns the value for the second column of the crossreference stream entry.longReturns the value for the third column of the crossreference stream entry.toString()Returns a string representation of this crossreference stream entry.Methods inherited from class org.apache.pdfbox.pdfparser.xref.AbstractXReference
compareTo, getFirstColumnValue, getType
-
Field Details
-
NULL_ENTRY
-
key
-
nextFreeObject
private final long nextFreeObject
-
-
Constructor Details
-
FreeXReference
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 Details
-
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
Returns a string representation of this crossreference stream entry.
-