public interface ExtractorProvider
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(FileMagic fm) |
POITextExtractor |
create(DirectoryNode poifsDir,
String password)
Create Extractor from POIFS node
|
POITextExtractor |
create(File file,
String password)
Create Extractor via file
|
POITextExtractor |
create(InputStream inputStream,
String password)
Create Extractor via InputStream
|
default void |
identifyEmbeddedResources(POIOLE2TextExtractor ext,
List<Entry> dirs,
List<InputStream> nonPOIFS)
Returns an array of text extractors, one for each of
the embedded documents in the file (if there are any).
|
boolean accepts(FileMagic fm)
POITextExtractor create(File file, String password) throws IOException
file - the filepassword - the password or null if not encryptedIOException - if file can't be read or parsedPOITextExtractor create(InputStream inputStream, String password) throws IOException
inputStream - the streampassword - the password or null if not encryptedIOException - if stream can't be read or parsedPOITextExtractor create(DirectoryNode poifsDir, String password) throws IOException
poifsDir - the nodepassword - the password or null if not encryptedIOException - if node can't be parsedIllegalStateException - if processing fails for some other reason,
e.g. missing JCE Unlimited Strength Jurisdiction Policy files
while handling encrypted files.default void identifyEmbeddedResources(POIOLE2TextExtractor ext, List<Entry> dirs, List<InputStream> nonPOIFS) throws IOException
POITextExtractor for each embedded file.ext - the extractor holding the directory to start parsingdirs - a list to be filled with directory references holding embeddednonPOIFS - a list to be filled with streams which aren't based on POIFS entriesIOException - when the format specific extraction fails because of invalid entriesIllegalArgumentException - if implementations do not overwrite this method