Class IndirectCOSObject

java.lang.Object
org.sejda.sambox.cos.COSBase
org.sejda.sambox.cos.IndirectCOSObject
All Implemented Interfaces:
COSObjectable

public class IndirectCOSObject extends COSBase
A COSBase that will be written as indirect object. This can be used to wrap COSBase (COSName, COSInteger, COSNull, COSBoolean) that are otherwise written as direct object by the body writer.
Author:
Andrea Vacondio
  • Method Details

    • getCOSObject

      public COSBase getCOSObject()
      Description copied from class: COSBase
      Convert this standard java object to a COS object.
      Specified by:
      getCOSObject in interface COSObjectable
      Overrides:
      getCOSObject in class COSBase
      Returns:
      The cos object that matches this Java object.
    • accept

      public void accept(COSVisitor visitor) throws IOException
      Description copied from class: COSBase
      Visitor pattern for the COS model objects
      Specified by:
      accept in class COSBase
      Throws:
      IOException
    • asIndirectObject

      public static IndirectCOSObject asIndirectObject(COSObjectable wrapped)
      Factory method for an object that will be written as an indirect object.
      Parameters:
      wrapped -
      Returns:
      the new instance