Class COSIncrement

java.lang.Object
org.apache.pdfbox.cos.COSIncrement
All Implemented Interfaces:
Iterable<COSBase>

public class COSIncrement extends Object implements Iterable<COSBase>
A COSIncrement starts at a given COSUpdateInfo to collect updates, that have been made to a COSDocument and therefore should be added to itīs next increment.
Author:
Christian Appl
See Also:
  • Constructor Details

  • Method Details

    • contains

      public boolean contains(COSBase base)
      Returns true if the given COSBase is already known to and has been processed by this COSIncrement.
      Parameters:
      base - The COSBase to check.
      Returns:
      true if the given COSBase is already known to and has been processed by this COSIncrement.
      See Also:
      • objects
      • processedObjects
    • exclude

      public COSIncrement exclude(COSBase... base)
      The given COSBases are not fit for inclusion in an increment and shall be added to excluded.
      null values shall be ignored.
      Parameters:
      base - The COSBases to add to excluded.
      Returns:
      The COSIncrement itself, to allow method chaining.
      See Also:
      • excluded
    • getObjects

      public Set<COSBase> getObjects()
      Returns all indirect COSBases, that shall be written to an increment as top level COSObjects.
      Calling this method will cause the increment to be initialized.
      Returns:
      All indirect COSBases, that shall be written to an increment as top level COSObjects.
      See Also:
      • objects
    • iterator

      public Iterator<COSBase> iterator()
      Return an iterator for the determined objects contained in this COSIncrement.
      Specified by:
      iterator in interface Iterable<COSBase>
      Returns:
      An iterator for the determined objects contained in this COSIncrement.