Top Description Fields Constructors Methods
org.apache.pdfbox.pdfparser.xref

public Class NormalXReference

extends AbstractXReference
Class Inheritance
Imports
org.apache.pdfbox.cos.COSBase, .COSName, .COSObject, .COSObjectKey, .COSStream, org.apache.pdfbox.pdfparser.PDFXRefStream

A class representing a normal reference in a PDF's crossreference stream (PDFXRefStream).
Author
Christian Appl

Field Summary

Modifier and TypeField and Description
private final long
private final COSObjectKey
private final COSBase
private final boolean

Constructor Summary

AccessConstructor and Description
public
NormalXReference(long
The byte offset of the COSObject in the PDF file.
byteOffset
,
COSObjectKey
The COSObjectKey, that is represented by this entry.
key
,
COSBase
The COSObject, that is represented by this entry.
object
)

Prepares a normal reference for the given COSObject in a PDF's crossreference stream (PDFXRefStream).

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

The byte offset of the COSObject in the PDF file.
getByteOffset
()

Returns the byte offset of the COSObject in the PDF file.

public COSBase

Returns:

The COSObject, that is described by this crossreference stream entry.
getObject
()

Returns the COSObject, that is described by this crossreference stream entry.

public COSObjectKey

Returns:

The COSObjectKey of the object, that is described by this crossreference stream entry.
getReferencedKey
()

Implements org.apache.pdfbox.pdfparser.xref.XReferenceEntry.getReferencedKey.

Returns the COSObjectKey of the object, that is described by this crossreference stream entry.

public long

Returns:

The value for the second column of the crossreference stream entry.
getSecondColumnValue
()

Implements org.apache.pdfbox.pdfparser.xref.XReferenceEntry.getSecondColumnValue.

Returns the value for the second column of the crossreference stream entry.

public long

Returns:

The value for the third column of the crossreference stream entry.
getThirdColumnValue
()

Implements org.apache.pdfbox.pdfparser.xref.XReferenceEntry.getThirdColumnValue.

Returns the value for the third column of the crossreference stream entry.

public boolean

Returns:

True, if the referenced object is an object stream.
isObjectStream
()

Returns true, if the referenced object is an object stream.

public String

Returns:

A string representation of this crossreference stream entry.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this crossreference stream entry.

Inherited from org.apache.pdfbox.pdfparser.xref.AbstractXReference:
compareTogetFirstColumnValuegetType

Field Detail

byteOffsetback to summary
private final long byteOffset
keyback to summary
private final COSObjectKey key
objectback to summary
private final COSBase object
objectStreamback to summary
private final boolean objectStream

Constructor Detail

NormalXReferenceback to summary
public NormalXReference(long byteOffset, COSObjectKey key, COSBase object)

Prepares a normal reference for the given COSObject in a PDF's crossreference stream (PDFXRefStream).

Parameters
byteOffset:long

The byte offset of the COSObject in the PDF file.

key:COSObjectKey

The COSObjectKey, that is represented by this entry.

object:COSBase

The COSObject, that is represented by this entry.

Method Detail

getByteOffsetback to summary
public long getByteOffset()

Returns the byte offset of the COSObject in the PDF file.

Returns:long

The byte offset of the COSObject in the PDF file.

getObjectback to summary
public COSBase getObject()

Returns the COSObject, that is described by this crossreference stream entry.

Returns:COSBase

The COSObject, that is described by this crossreference stream entry.

getReferencedKeyback to summary
public COSObjectKey getReferencedKey()

Implements org.apache.pdfbox.pdfparser.xref.XReferenceEntry.getReferencedKey.

Returns the COSObjectKey of the object, that is described by this crossreference stream entry.

Returns:COSObjectKey

The COSObjectKey of the object, that is described by this crossreference stream entry.

Annotations
@Override
getSecondColumnValueback to summary
public long getSecondColumnValue()

Implements org.apache.pdfbox.pdfparser.xref.XReferenceEntry.getSecondColumnValue.

Returns the value for the second column of the crossreference stream entry. (This is byte offset of the COSObject in the PDF file - for entries of this type.)

Returns:long

The value for the second column of the crossreference stream entry.

Annotations
@Override
getThirdColumnValueback to summary
public long getThirdColumnValue()

Implements org.apache.pdfbox.pdfparser.xref.XReferenceEntry.getThirdColumnValue.

Returns the value for the third column of the crossreference stream entry. (This is the generation number of the set COSObjectKey - for entries of this type.)

Returns:long

The value for the third column of the crossreference stream entry.

Annotations
@Override
isObjectStreamback to summary
public boolean isObjectStream()

Returns true, if the referenced object is an object stream.

Returns:boolean

True, if the referenced object is an object stream.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this crossreference stream entry.

Returns:String

A string representation of this crossreference stream entry.

Annotations
@Override