public class OLE2ScratchpadExtractorFactory extends java.lang.Object implements ExtractorProvider
ExtractorFactory
and
ExtractorFactory
, which permit the other two to run with no Scratchpad jar (though without functionality!)
Note - should not be used standalone, always use via the other two classes
(ExtractorFactory 和 ExtractorFactory 的 Scratchpad 特定逻辑,允许其他两个在没有 Scratchpad jar 的情况下运行(尽管没有功能!)注意 - 不应单独使用,始终通过其他两个类使用)Constructor and Description |
---|
OLE2ScratchpadExtractorFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(FileMagic fm) |
POITextExtractor |
create(DirectoryNode poifsDir, java.lang.String password)
Look for certain entries in the stream, to figure it out what format is desired Note - doesn't check for core-supported formats! Note - doesn't check for OOXML-supported formats
(在流中查找某些条目,以确定所需的格式 注意 - 不检查核心支持的格式!注意 - 不检查 OOXML 支持的格式)
|
POITextExtractor |
create(java.io.File file, java.lang.String password)
Create Extractor via file
(通过文件创建提取器)
|
POITextExtractor |
create(java.io.InputStream inputStream, java.lang.String password)
Create Extractor via InputStream
(通过 InputStream 创建提取器)
|
void |
identifyEmbeddedResources(POIOLE2TextExtractor ext, java.util.List<Entry> dirs, java.util.List<java.io.InputStream> nonPOIFS)
Returns an array of text extractors, one for each of the embedded documents in the file (if there are any).
(返回一个文本提取器数组,一个用于文件中的每个嵌入文档(如果有的话)。)
|
public boolean accepts(FileMagic fm)
accepts
in interface
ExtractorProvider
(在接口 ExtractorProvider 中接受)
public POITextExtractor create(java.io.File file, java.lang.String password) throws java.io.IOException
ExtractorProvider
create
in interface
ExtractorProvider
(在接口 ExtractorProvider 中创建)
file
- the file
(文件 - 文件)
password
- the password or
null
if not encrypted
(password - 密码;如果未加密,则为 null)
java.io.IOException
- if file can't be read or parsed
(java.io.IOException - 如果文件无法读取或解析)
public POITextExtractor create(java.io.InputStream inputStream, java.lang.String password) throws java.io.IOException
ExtractorProvider
create
in interface
ExtractorProvider
(在接口 ExtractorProvider 中创建)
inputStream
- the stream
(inputStream - 流)
password
- the password or
null
if not encrypted
(password - 密码;如果未加密,则为 null)
java.io.IOException
- if stream can't be read or parsed
(java.io.IOException - 如果无法读取或解析流)
public POITextExtractor create(DirectoryNode poifsDir, java.lang.String password) throws java.io.IOException
create
in interface
ExtractorProvider
(在接口 ExtractorProvider 中创建)
poifsDir
- the directory node to be inspected
(poifsDir - 要检查的目录节点)
password
- the password or
null
if not encrypted
(password - 密码;如果未加密,则为 null)
java.io.IOException
- when the format specific extraction fails because of invalid entires
(java.io.IOException - 当格式特定的提取由于无效的整体而失败时)
public void identifyEmbeddedResources(POIOLE2TextExtractor ext, java.util.List<Entry> dirs, java.util.List<java.io.InputStream> nonPOIFS)
POITextExtractor
for each embedded file.
(返回一个文本提取器数组,一个用于文件中的每个嵌入文档(如果有的话)。如果没有嵌入文档,您将返回一个空数组。否则,您将为每个嵌入文件获得一个打开的 POITextExtractor。)
identifyEmbeddedResources
in interface
ExtractorProvider
(接口 ExtractorProvider 中的 identifyEmbeddedResources)
ext
- the extractor holding the directory to start parsing
(ext - 包含要开始解析的目录的提取器)
dirs
- a list to be filled with directory references holding embedded
(dirs - 一个包含嵌入目录引用的列表)
nonPOIFS
- a list to be filled with streams which aren't based on POIFS entries
(nonPOIFS - 一个要填充不基于 POIFS 条目的流的列表)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.