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
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 Summary
Modifier and TypeMethodDescriptionfetch(String fetchKey, Metadata metadata, ParseContext parseContext) Fetches a resource and returns it as a TikaInputStream.Methods inherited from interface org.apache.tika.plugins.TikaExtension
getExtensionConfig
-
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 informationparseContext- the parse context- Returns:
- a TikaInputStream for reading the resource content
- Throws:
TikaException- if a Tika-specific error occurs during fetchingIOException- if an I/O error occurs during fetchingSecurityException- 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)
-