Package com.orsonpdf
Class DictionaryObject
- java.lang.Object
-
- com.orsonpdf.PDFObject
-
- com.orsonpdf.DictionaryObject
-
- Direct Known Subclasses:
GraphicsStateDictionary
public class DictionaryObject extends PDFObject
A PDF object that is represented by a dictionary. This is used to represent theCatalogand theOutlines(the latter being a placeholder implementation only since we don't presently generate outlines).
-
-
Field Summary
Fields Modifier and Type Field Description protected Dictionarydictionary
-
Constructor Summary
Constructors Constructor Description DictionaryObject(int number, java.lang.String type)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getObjectBytes()Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.voidput(java.lang.String name, java.lang.Object value)Puts an item in the dictionary.java.lang.Objectremove(java.lang.String name)Removes an item from the dictionary.-
Methods inherited from class com.orsonpdf.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
-
-
-
Field Detail
-
dictionary
protected final Dictionary dictionary
-
-
Method Detail
-
put
public void put(java.lang.String name, java.lang.Object value)Puts an item in the dictionary.- Parameters:
name- the name (without the leading "/",nullnot permitted).value- the value (nullnot permitted).
-
remove
public java.lang.Object remove(java.lang.String name)
Removes an item from the dictionary.- Parameters:
name- the name (without the leading "/").- Returns:
- The value that was previously stored with the given name.
-
getObjectBytes
public byte[] getObjectBytes()
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytesin classPDFObject- Returns:
- A byte array.
-
-