Package org.apache.pdfbox.pdfwriter
Class COSWriterXRefEntry
- java.lang.Object
-
- org.apache.pdfbox.pdfwriter.COSWriterXRefEntry
-
- All Implemented Interfaces:
java.lang.Comparable<COSWriterXRefEntry>
public class COSWriterXRefEntry extends java.lang.Object implements java.lang.Comparable<COSWriterXRefEntry>
this is en entry in the xref section of the physical pdf document generated by the COSWriter.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
free
private COSObjectKey
key
private static COSWriterXRefEntry
NULLENTRY
private COSBase
object
private long
offset
-
Constructor Summary
Constructors Constructor Description COSWriterXRefEntry(long start, COSBase obj, COSObjectKey keyValue)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(COSWriterXRefEntry obj)
COSObjectKey
getKey()
This will get the Object key.static COSWriterXRefEntry
getNullEntry()
This will return a null entry: 0000000000 65535 f.COSBase
getObject()
This will get the object.long
getOffset()
This will get the offset into the document.boolean
isFree()
Gets the xref 'free' attribute.void
setFree(boolean newFree)
This will set the free attribute.private void
setKey(COSObjectKey newKey)
This will set the object key.private void
setObject(COSBase newObject)
This will set the object for this xref.void
setOffset(long newOffset)
The offset attribute.
-
-
-
Field Detail
-
offset
private long offset
-
object
private COSBase object
-
key
private COSObjectKey key
-
free
private boolean free
-
NULLENTRY
private static final COSWriterXRefEntry NULLENTRY
-
-
Constructor Detail
-
COSWriterXRefEntry
public COSWriterXRefEntry(long start, COSBase obj, COSObjectKey keyValue)
Constructor.- Parameters:
start
- The start attribute.obj
- The COS object that this entry represents.keyValue
- The key to the COS object.
-
-
Method Detail
-
compareTo
public int compareTo(COSWriterXRefEntry obj)
- Specified by:
compareTo
in interfacejava.lang.Comparable<COSWriterXRefEntry>
-
getNullEntry
public static COSWriterXRefEntry getNullEntry()
This will return a null entry: 0000000000 65535 f.- Returns:
- null COSWriterXRefEntry
-
getKey
public COSObjectKey getKey()
This will get the Object key.- Returns:
- The object key.
-
getOffset
public long getOffset()
This will get the offset into the document.- Returns:
- The offset into the document.
-
isFree
public boolean isFree()
Gets the xref 'free' attribute.- Returns:
- The free attribute.
-
setFree
public void setFree(boolean newFree)
This will set the free attribute.- Parameters:
newFree
- The newly freed attribute.
-
setKey
private void setKey(COSObjectKey newKey)
This will set the object key.- Parameters:
newKey
- The new object key.
-
setOffset
public final void setOffset(long newOffset)
The offset attribute.- Parameters:
newOffset
- The new value for the offset.
-
getObject
public COSBase getObject()
This will get the object.- Returns:
- The object.
-
setObject
private void setObject(COSBase newObject)
This will set the object for this xref.- Parameters:
newObject
- The object that is being set.
-
-