Class COSObject

    • Constructor Detail

      • COSObject

        public COSObject​(COSBase object)
                  throws java.io.IOException
        Constructor.
        Parameters:
        object - The object that this encapsulates.
        Throws:
        java.io.IOException - If there is an error with the object passed in.
    • Method Detail

      • getDictionaryObject

        public COSBase getDictionaryObject​(COSName key)
        This will get the dictionary object in this object that has the name key and if it is a pdfobjref then it will dereference that and return it.
        Parameters:
        key - The key to the value that we are searching for.
        Returns:
        The pdf object that matches the key.
      • getItem

        public COSBase getItem​(COSName key)
        This will get the dictionary object in this object that has the name key.
        Parameters:
        key - The key to the value that we are searching for.
        Returns:
        The pdf object that matches the key.
      • getObject

        public COSBase getObject()
        This will get the object that this object encapsulates.
        Returns:
        The encapsulated object.
      • setObject

        public void setObject​(COSBase object)
                       throws java.io.IOException
        This will set the object that this object encapsulates.
        Parameters:
        object - The new object to encapsulate.
        Throws:
        java.io.IOException - If there is an error setting the updated object.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getObjectNumber

        public COSInteger getObjectNumber()
        Getter for property objectNumber.
        Returns:
        Value of property objectNumber.
      • setObjectNumber

        public void setObjectNumber​(COSInteger objectNum)
        Setter for property objectNumber.
        Parameters:
        objectNum - New value of property objectNumber.
      • getGenerationNumber

        public COSInteger getGenerationNumber()
        Getter for property generationNumber.
        Returns:
        Value of property generationNumber.
      • setGenerationNumber

        public void setGenerationNumber​(COSInteger generationNumberValue)
        Setter for property generationNumber.
        Parameters:
        generationNumberValue - New value of property generationNumber.
      • accept

        public java.lang.Object accept​(ICOSVisitor visitor)
                                throws COSVisitorException
        visitor pattern double dispatch method.
        Specified by:
        accept in class COSBase
        Parameters:
        visitor - The object to notify when visiting this object.
        Returns:
        any object, depending on the visitor implementation, or null
        Throws:
        COSVisitorException - If an error occurs while visiting this object.