Interface Fetcher

All Superinterfaces:
org.pf4j.ExtensionPoint, TikaExtension
All Known Subinterfaces:
RangeFetcher
All Known Implementing Classes:
AtlassianJwtFetcher, AZBlobFetcher, BytesFetcher, EmptyFetcher, FileSystemFetcher, GCSFetcher, GoogleDriveFetcher, HttpFetcher, MicrosoftGraphFetcher, S3Fetcher

public interface Fetcher extends TikaExtension, org.pf4j.ExtensionPoint
Interface for an object that will fetch a TikaInputStream given a fetch string. This will also update the metadata object based on the fetch.

Implementations of Fetcher must be thread safe.

  • Method Details

    • fetch

      TikaInputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException
      Fetches a resource and returns it as a TikaInputStream.
      Parameters:
      fetchKey - the key identifying the resource to fetch (interpretation depends on the implementation, e.g., file path, URL, S3 key)
      metadata - metadata object to be updated with resource information
      parseContext - the parse context
      Returns:
      a TikaInputStream for reading the resource content
      Throws:
      TikaException - if a Tika-specific error occurs during fetching
      IOException - if an I/O error occurs during fetching
      SecurityException - if the fetchKey attempts to access a resource outside permitted boundaries (e.g., path traversal attack)
      IllegalArgumentException - if the fetchKey contains invalid characters (e.g., null bytes)