Package org.apache.pdfbox.pdfparser.xref
Class ObjectStreamXReference
- java.lang.Object
-
- org.apache.pdfbox.pdfparser.xref.AbstractXReference
-
- org.apache.pdfbox.pdfparser.xref.ObjectStreamXReference
-
- All Implemented Interfaces:
java.lang.Comparable<XReferenceEntry>,XReferenceEntry
public class ObjectStreamXReference extends AbstractXReference
A class representing a reference to an object stream entry in a PDF's crossreference stream (PDFXRefStream).
-
-
Field Summary
Fields Modifier and Type Field Description private COSObjectKeykeyprivate COSBaseobjectprivate intobjectStreamIndexprivate COSObjectKeyparentKey
-
Constructor Summary
Constructors Constructor Description ObjectStreamXReference(int objectStreamIndex, COSObjectKey key, COSBase object, COSObjectKey parentKey)Prepares a object stream entry reference for the givenCOSObjectin a PDF's crossreference stream (PDFXRefStream).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSBasegetObject()Returns theCOSObject, that is described by this crossreference stream entry.intgetObjectStreamIndex()Returns the index of theCOSObjectin it's containing object stream.COSObjectKeygetParentKey()Returns theCOSObjectKeyof the object stream, that is containing the object.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
-
objectStreamIndex
private final int objectStreamIndex
-
key
private final COSObjectKey key
-
object
private final COSBase object
-
parentKey
private final COSObjectKey parentKey
-
-
Constructor Detail
-
ObjectStreamXReference
public ObjectStreamXReference(int objectStreamIndex, COSObjectKey key, COSBase object, COSObjectKey parentKey)Prepares a object stream entry reference for the givenCOSObjectin a PDF's crossreference stream (PDFXRefStream).- Parameters:
objectStreamIndex- The index of theCOSObjectin the containing object stream.key- TheCOSObjectKey, that is represented by this entry.object- TheCOSObject, that is represented by this entry.parentKey- TheCOSObjectKeyof the object stream, that is containing the object.
-
-
Method Detail
-
getObjectStreamIndex
public int getObjectStreamIndex()
Returns the index of theCOSObjectin it's containing object stream.- Returns:
- The index of the
COSObjectin it's containing object stream.
-
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.
-
getObject
public COSBase getObject()
Returns theCOSObject, that is described by this crossreference stream entry.- Returns:
- The
COSObject, that is described by this crossreference stream entry.
-
getParentKey
public COSObjectKey getParentKey()
Returns theCOSObjectKeyof the object stream, that is containing the object.- Returns:
- The
COSObjectKeyof the object stream, that is containing the object.
-
getSecondColumnValue
public long getSecondColumnValue()
Returns the value for the second column of the crossreference stream entry. (This is object number from theCOSObjectKeyof the object stream, that is containing the object represented by this entry - 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 index of theCOSObjectin the containing object stream - 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.
-
-