Package com.orsonpdf

Class DictionaryObject

  • Direct Known Subclasses:
    GraphicsStateDictionary

    public class DictionaryObject
    extends PDFObject
    A PDF object that is represented by a dictionary. This is used to represent the Catalog and the Outlines (the latter being a placeholder implementation only since we don't presently generate outlines).
    • 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dictionary

        protected final Dictionary dictionary
    • Constructor Detail

      • DictionaryObject

        DictionaryObject​(int number,
                         java.lang.String type)
        Creates a new instance.
        Parameters:
        number - the object number.
        type - the object type (for example, "/Catalog").
    • 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 class PDFObject
        Returns:
        A byte array.