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 theCatalog
and theOutlines
(the latter being a placeholder implementation only since we don't presently generate outlines).
-
-
Field Summary
Fields Modifier and Type Field Description protected Dictionary
dictionary
-
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.void
put(java.lang.String name, java.lang.Object value)
Puts an item in the dictionary.java.lang.Object
remove(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 "/",null
not permitted).value
- the value (null
not 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:
getObjectBytes
in classPDFObject
- Returns:
- A byte array.
-
-