public class OfficeExtractor extends Object implements IFileParser
构造器和说明 |
---|
OfficeExtractor() |
限定符和类型 | 方法和说明 |
---|---|
static String |
docTextFilter(String str)
将解析office文档的text内容进行过滤,过滤到乱码。
|
Reader |
getContentReader() |
String |
getContentString()
已过时。
废弃别再使用
|
String |
getContentString(String... mimeType)
支持Office2003(Word,Excel,PowerPoint,Visio)
支持Office2007(Word,Excel,PowerPoint,Visio)
如果需要解析Excel,需要传入mimeType参数
IFileParser.MIME_XLS:2003格式的Excel IFileParser.MIME_XLSX:2007格式的Excel |
String |
getMetadata(String metadataname) |
String |
getTitle() |
void |
setFile(File file) |
public Reader getContentReader()
getContentReader
在接口中 IFileParser
public String getContentString(String... mimeType)
file
- public String getMetadata(String metadataname)
getMetadata
在接口中 IFileParser
public String getTitle()
getTitle
在接口中 IFileParser
public void setFile(File file)
setFile
在接口中 IFileParser
public static String docTextFilter(String str)
str
- public String getContentString()
getContentString
在接口中 IFileParser
Copyright © 2016–2017. All rights reserved.