Class PDFDictionary
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFDictionary
- All Implemented Interfaces:
CompressedObject, PDFWritable
- Direct Known Subclasses:
PDFDPart, PDFDPartRoot, PDFEncoding, PDFFileSpec, PDFFont, PDFFontDescriptor, PDFIdentifiedDictionary, PDFLinearization.LinearPDFDictionary, PDFNames, PDFNameTreeNode, PDFNumberTreeNode, PDFResourceContext, PDFResources, PDFRoot, PDFSignature.AcroForm, PDFSignature.AP, PDFSignature.DocMDP, PDFSignature.Perms, PDFSignature.SigField, PDFSignature.SigRef, PDFSignature.TransformParams, StructureHierarchyMember, TransitionDictionary
Class representing a PDF dictionary object
-
Field Summary
FieldsModifier and TypeFieldDescriptionthe entry mapmaintains the order of the entries added to the entry map.private boolean -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new dictionary object.PDFDictionary(PDFObject parent) Create a new dictionary object. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String name) Returns the value given a name.static voidgetChildren(Collection<Object> values, Set<PDFObject> children) voidgetChildren(Set<PDFObject> children) keySet()intoutput(OutputStream stream) Write the PDF represention of this objectvoidPuts a new name/value pair.voidPuts a new name/value pair.voidRemoves the mapping for the specified keyprotected voidwriteDictionary(OutputStream out, StringBuilder textBuffer) Writes the contents of the dictionary to a StringBuffer.Methods inherited from class PDFObject
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, supportsObjectStream, toPDF, toPDFString
-
Field Details
-
visited
private boolean visited -
entries
-
order
-
-
Constructor Details
-
PDFDictionary
public PDFDictionary()Create a new dictionary object. -
PDFDictionary
Create a new dictionary object.- Parameters:
parent- the object's parent if any
-
-
Method Details
-
put
-
put
Puts a new name/value pair.- Parameters:
name- the namevalue- the value
-
get
-
output
Write the PDF represention of this object- Specified by:
outputin interfaceCompressedObject- Overrides:
outputin classPDFObject- Parameters:
stream- the stream to write the PDF to- Returns:
- the number of bytes written
- Throws:
IOException- if there is an error writing to the stream
-
writeDictionary
Writes the contents of the dictionary to a StringBuffer.- Parameters:
out- the OutputStream (for binary content)textBuffer- the text buffer for text output- Throws:
IOException- if an I/O error occurs
-
getChildren
- Overrides:
getChildrenin classPDFObject
-
getChildren
-
keySet
-
containsKey
- Parameters:
name- The key to find in the map.- Returns:
- true if the map contains this key.
- See Also:
-
remove
Removes the mapping for the specified key- Parameters:
name- key whose mapping is to be removed
-