Package org.apache.pdfbox.pdfwriter
Class COSWriterXRefEntry
java.lang.Object
org.apache.pdfbox.pdfwriter.COSWriterXRefEntry
- All Implemented Interfaces:
Comparable<COSWriterXRefEntry>
this is en entry in the xref section of the physical pdf document
generated by the COSWriter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate COSObjectKeyprivate static final COSWriterXRefEntryprivate COSBaseprivate long -
Constructor Summary
ConstructorsConstructorDescriptionCOSWriterXRefEntry(long start, COSBase obj, COSObjectKey keyValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintgetKey()This will get the Object key.static COSWriterXRefEntryThis will return a null entry: 0000000000 65535 f.This will get the object.longThis will get the offset into the document.booleanisFree()Gets the xref 'free' attribute.voidsetFree(boolean newFree) This will set the free attribute.private voidsetKey(COSObjectKey newKey) This will set the object key.private voidThis will set the object for this xref.final voidsetOffset(long newOffset) The offset attribute.
-
Field Details
-
offset
private long offset -
object
-
key
-
free
private boolean free -
NULLENTRY
-
-
Constructor Details
-
COSWriterXRefEntry
Constructor.- Parameters:
start- The start attribute.obj- The COS object that this entry represents.keyValue- The key to the COS object.
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<COSWriterXRefEntry>
-
getNullEntry
This will return a null entry: 0000000000 65535 f.- Returns:
- null COSWriterXRefEntry
-
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
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
This will get the object.- Returns:
- The object.
-
setObject
This will set the object for this xref.- Parameters:
newObject- The object that is being set.
-