Class COSObject

    • Field Detail

      • baseObject

        private COSBase baseObject
      • isDereferenced

        private boolean isDereferenced
      • LOG

        private static final org.apache.commons.logging.Log LOG
    • Constructor Detail

      • COSObject

        public COSObject​(COSBase object)
        Constructor.
        Parameters:
        object - The object that this encapsulates.
      • COSObject

        public COSObject​(COSBase object,
                         COSObjectKey objectKey)
        Constructor.
        Parameters:
        object - The object that this encapsulates.
        objectKey - The COSObjectKey of the encapsulated object
      • COSObject

        public COSObject​(COSBase object,
                         ICOSParser parser)
        Constructor.
        Parameters:
        object - The object that this encapsulates.
        parser - The parser to be used to load the object on demand
      • COSObject

        public COSObject​(COSObjectKey key,
                         ICOSParser parser)
        Constructor.
        Parameters:
        key - The object number of the encapsulated object.
        parser - The parser to be used to load the object on demand
    • Method Detail

      • isObjectNull

        public boolean isObjectNull()
        Indicates if the referenced object is present or not.
        Returns:
        true if the indirect object is dereferenced
      • getObject

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

        public final void setToNull()
        Sets the referenced object to COSNull and removes the initially assigned parser.
      • toString

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

        @Deprecated
        public long getObjectNumber()
        Deprecated.
        will be removed in 4.0.0
        Getter for property objectNumber.
        Returns:
        Value of property objectNumber.
      • getGenerationNumber

        @Deprecated
        public int getGenerationNumber()
        Deprecated.
        will be removed in 4.0.0
        Getter for property generationNumber.
        Returns:
        Value of property generationNumber.
      • accept

        public void accept​(ICOSVisitor visitor)
                    throws java.io.IOException
        visitor pattern double dispatch method.
        Specified by:
        accept in class COSBase
        Parameters:
        visitor - The object to notify when visiting this object.
        Throws:
        java.io.IOException - If an error occurs while visiting this object.
      • isDereferenced

        public boolean isDereferenced()
        Returns true, if the hereby referenced COSBase has already been parsed and loaded.
        Returns:
        true, if the hereby referenced COSBase has already been parsed and loaded.