Apache-Tika
Apache Tika 文档解析
文档解析示例
@Test
@SneakyThrows
public void testParser() {
AutoDetectParser parser = new AutoDetectParser();
BodyContentHandler handler = new BodyContentHandler();
Metadata metadata = new Metadata();
String filePath = "/path-to-doc.docx";
try (InputStream stream = new FileInputStream(filePath)) {
parser.parse(stream, handler, metadata);
log.info(handler.toString());
} catch (Exception e) {
log.error("解析失败", e);
}
}
上一篇 RIME 鼠须管输入法
下一篇 MinIO
页面信息
location:
protocol
: host
: hostname
: origin
: pathname
: href
: document:
referrer
: navigator:
platform
: userAgent
: