Class POIXMLExtractorFactory

  • All Implemented Interfaces:
    ExtractorProvider

    public final class POIXMLExtractorFactory
    extends Object
    implements ExtractorProvider
    Figures out the correct POITextExtractor for your supplied document, and returns it.

    Note 1 - will fail for many file formats if the POI Scratchpad jar is not present on the runtime classpath

    Note 2 - rather than using this, for most cases you would be better off switching to Apache Tika instead!

    • Constructor Detail

      • POIXMLExtractorFactory

        public POIXMLExtractorFactory()
    • Method Detail

      • getThreadPrefersEventExtractors

        public 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.
      • getAllThreadsPreferEventExtractors

        public static 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.
      • setThreadPrefersEventExtractors

        public 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.
      • setAllThreadsPreferEventExtractors

        public static void setAllThreadsPreferEventExtractors​(Boolean preferEventExtractors)
        Should all threads prefer event based over usermodel based extractors? If set, will take preference over the Thread level setting.
      • getPreferEventExtractor

        public static boolean getPreferEventExtractor()
        Should this thread use event based extractors is available? Checks the all-threads one first, then thread specific.