public class OLE2ExtractorFactory
extends java.lang.Object
Note 1 - will fail for many file formats if the POI Scratchpad jar is not present on the runtime classpath
Note 2 - for text extractor creation across all formats, use
ExtractorFactory
contained within
the OOXML jar.
Note 3 - rather than using this, for most cases you would be better off switching to Apache Tika instead!
Constructor and Description |
---|
OLE2ExtractorFactory() |
Modifier and Type | Method and Description |
---|---|
static POITextExtractor |
createExtractor(DirectoryNode poifsDir)
Create the Extractor, if possible.
|
static POITextExtractor |
createExtractor(java.io.InputStream input) |
static POIOLE2TextExtractor |
createExtractor(NPOIFSFileSystem fs) |
static POIOLE2TextExtractor |
createExtractor(OPOIFSFileSystem fs) |
static POIOLE2TextExtractor |
createExtractor(POIFSFileSystem fs) |
static java.lang.Boolean |
getAllThreadsPreferEventExtractors()
Should all threads prefer event based over usermodel based extractors?
(usermodel extractors tend to be more accurate, but use more memory)
Default is to use the thread level setting, which defaults to false.
|
static POITextExtractor[] |
getEmbededDocsTextExtractors(POIOLE2TextExtractor ext)
Returns an array of text extractors, one for each of
the embedded documents in the file (if there are any).
|
protected static boolean |
getPreferEventExtractor()
Should this thread use event based extractors is available?
Checks the all-threads one first, then thread specific.
|
static boolean |
getThreadPrefersEventExtractors()
Should this thread prefer event based over usermodel based extractors?
(usermodel extractors tend to be more accurate, but use more memory)
Default is false.
|
static void |
setAllThreadsPreferEventExtractors(java.lang.Boolean preferEventExtractors)
Should all threads prefer event based over usermodel based extractors?
If set, will take preference over the Thread level setting.
|
static void |
setThreadPrefersEventExtractors(boolean preferEventExtractors)
Should this thread prefer event based over usermodel based extractors?
Will only be used if the All Threads setting is null.
|
public static boolean getThreadPrefersEventExtractors()
public static java.lang.Boolean getAllThreadsPreferEventExtractors()
public static void setThreadPrefersEventExtractors(boolean preferEventExtractors)
public static void setAllThreadsPreferEventExtractors(java.lang.Boolean preferEventExtractors)
protected static boolean getPreferEventExtractor()
public static POIOLE2TextExtractor createExtractor(POIFSFileSystem fs) throws java.io.IOException
java.io.IOException
public static POIOLE2TextExtractor createExtractor(NPOIFSFileSystem fs) throws java.io.IOException
java.io.IOException
public static POIOLE2TextExtractor createExtractor(OPOIFSFileSystem fs) throws java.io.IOException
java.io.IOException
public static POITextExtractor createExtractor(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static POITextExtractor createExtractor(DirectoryNode poifsDir) throws java.io.IOException
ExtractorFactory
for that.java.io.IOException
public static POITextExtractor[] getEmbededDocsTextExtractors(POIOLE2TextExtractor ext) throws java.io.IOException
POITextExtractor
for each embedded file.java.io.IOException
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.