Package com.itextpdf.kernel.pdf
Class PdfPrimitiveObject
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObject
-
- com.itextpdf.kernel.pdf.PdfPrimitiveObject
-
- Direct Known Subclasses:
PdfBoolean
,PdfLiteral
,PdfName
,PdfNull
,PdfNumber
,PdfString
public abstract class PdfPrimitiveObject extends PdfObject
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
content
protected boolean
directOnly
-
Fields inherited from class com.itextpdf.kernel.pdf.PdfObject
ARRAY, BOOLEAN, DICTIONARY, FLUSHED, FORBID_RELEASE, FREE, INDIRECT_REFERENCE, indirectReference, LITERAL, MODIFIED, MUST_BE_FLUSHED, MUST_BE_INDIRECT, NAME, NULL, NUMBER, ORIGINAL_OBJECT_STREAM, READ_ONLY, READING, STREAM, STRING, UNENCRYPTED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PdfPrimitiveObject()
protected
PdfPrimitiveObject(boolean directOnly)
protected
PdfPrimitiveObject(byte[] content)
Initialize PdfPrimitiveObject from the passed bytes.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
compareContent(PdfPrimitiveObject o)
protected void
copyContent(PdfObject from, PdfDocument document, ICopyFilter copyFilter)
Copies object content from object 'from'.protected abstract void
generateContent()
protected byte[]
getInternalContent()
protected boolean
hasContent()
PdfObject
makeIndirect(PdfDocument document, PdfIndirectReference reference)
Marks object to be saved as indirect.PdfObject
setIndirectReference(PdfIndirectReference indirectReference)
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObject
checkState, clearState, clone, clone, containsIndirectReference, copyContent, copyTo, copyTo, copyTo, copyTo, equalContent, flush, flush, getIndirectReference, getType, isArray, isBoolean, isDictionary, isFlushed, isIndirect, isIndirectReference, isLiteral, isModified, isName, isNull, isNumber, isReleaseForbidden, isStream, isString, makeIndirect, newInstance, processCopying, processCopying, release, setModified, setState
-
-
-
-
Constructor Detail
-
PdfPrimitiveObject
protected PdfPrimitiveObject()
-
PdfPrimitiveObject
protected PdfPrimitiveObject(boolean directOnly)
-
PdfPrimitiveObject
protected PdfPrimitiveObject(byte[] content)
Initialize PdfPrimitiveObject from the passed bytes.- Parameters:
content
- byte content, shall not be null.
-
-
Method Detail
-
getInternalContent
protected final byte[] getInternalContent()
-
hasContent
protected boolean hasContent()
-
generateContent
protected abstract void generateContent()
-
makeIndirect
public PdfObject makeIndirect(PdfDocument document, PdfIndirectReference reference)
Description copied from class:PdfObject
Marks object to be saved as indirect.- Overrides:
makeIndirect
in classPdfObject
- Parameters:
document
- a document the indirect reference will belong to.reference
- indirect reference which will be associated with this document- Returns:
- object itself.
-
setIndirectReference
public PdfObject setIndirectReference(PdfIndirectReference indirectReference)
- Overrides:
setIndirectReference
in classPdfObject
-
copyContent
protected void copyContent(PdfObject from, PdfDocument document, ICopyFilter copyFilter)
Description copied from class:PdfObject
Copies object content from object 'from'.- Overrides:
copyContent
in classPdfObject
- Parameters:
from
- object to copy content from.document
- document to copy object to.copyFilter
-ICopyFilter
a filter that will apply on dictionaries and array UseNullCopyFilter
for no filtering
-
compareContent
protected int compareContent(PdfPrimitiveObject o)
-
-