Interface IndirectObjectsProvider

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
LazyIndirectObjectsProvider

interface IndirectObjectsProvider extends Closeable
Component providing COSBase objects for given keys. It's used when an indirect reference is asked to resolve to the actual COS object. This component is populated during the xref parsing process by adding XrefEntrys found in the xref table/stream, it's then initialized with COSParser to use to parse and retrieve requested objects and the SecurityHandler required (if any) to decrypt streams and string.
  • Method Details

    • get

      Parameters:
      key -
      Returns:
      the COSBase corresponding to the given key.
    • release

      void release(COSObjectKey key)
      Signals that the object corresponding to the given key is no longer needed and can be released
      Parameters:
      key -
    • addEntryIfAbsent

      XrefEntry addEntryIfAbsent(XrefEntry entry)
      Adds the given xref entry to the Xref if absent
      Parameters:
      entry -
      Returns:
      null if the entry was added. The current entry with the given object number and generation if the entry was already present.
      See Also:
    • addEntry

      XrefEntry addEntry(XrefEntry entry)
      Adds the given xref entry to the Xref
      Parameters:
      entry -
      Returns:
      the previous value or null if no entry was previously associated to the given object number and generation.
      See Also:
    • initializeWith

      IndirectObjectsProvider initializeWith(COSParser parser)
      Initialize the component with the COSParser to use to retrieve and parse requested object
      Parameters:
      parser -
      Returns:
      this provider
    • initializeWith

      IndirectObjectsProvider initializeWith(SecurityHandler handler)
      Initialize the component with the SecurityHandler to decrypt streams and strings.
      Parameters:
      handler -
      Returns:
      this provider
    • highestKey

      COSObjectKey highestKey()
      Returns:
      the highest key (object number + generation number) for this provider.
    • id

      String id()
      Returns:
      the unique id for the provider.