public final class Word6Extractor extends java.lang.Object implements POIOLE2TextExtractor
WordExtractor
which deals properly with HWPF.
(从旧(Word 6 / Word 95)Word 文档中提取文本的类。这应该只用于较旧的文件,对于大多数用途,您应该调用正确处理 HWPF 的 WordExtractor。)
Constructor and Description |
---|
Word6Extractor(DirectoryNode dir) |
Word6Extractor(DirectoryNode dir, POIFSFileSystem fs)
Deprecated.
Use
Word6Extractor(DirectoryNode) instead
|
Word6Extractor(HWPFOldDocument doc)
Create a new Word Extractor
|
Word6Extractor(java.io.InputStream is)
Create a new Word Extractor
|
Word6Extractor(POIFSFileSystem fs)
Create a new Word Extractor
|
Modifier and Type | Method and Description |
---|---|
HWPFOldDocument |
getDocument()
Return the underlying POIDocument
(返回底层 POIDocument)
|
HWPFOldDocument |
getFilesystem() |
java.lang.String[] |
getParagraphText()
Deprecated.
(已弃用。)
|
java.lang.String |
getText()
Retrieves all the text from the document.
(从文档中检索所有文本。)
|
boolean |
isCloseFilesystem() |
void |
setCloseFilesystem(boolean doCloseFilesystem) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDocSummaryInformation, getMetadataTextExtractor, getRoot, getSummaryInformation
close
public Word6Extractor(java.io.InputStream is) throws java.io.IOException
is
- InputStream containing the word file
(is - InputStream 包含单词文件)
java.io.IOException
(java.io.IOException)
public Word6Extractor(POIFSFileSystem fs) throws java.io.IOException
fs
- POIFSFileSystem containing the word file
(fs - 包含单词文件的 POIFSFileSystem)
java.io.IOException
(java.io.IOException)
@Deprecated public Word6Extractor(DirectoryNode dir, POIFSFileSystem fs) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public Word6Extractor(DirectoryNode dir) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public Word6Extractor(HWPFOldDocument doc)
doc
- The HWPFOldDocument to extract from
(doc - 要从中提取的 HWPFOldDocument)
@Deprecated public java.lang.String[] getParagraphText()
public java.lang.String getText()
POITextExtractor
getText
in interface
POITextExtractor
(接口 POITextExtractor 中的 getText)
public HWPFOldDocument getDocument()
POIOLE2TextExtractor
getDocument
in interface
POIOLE2TextExtractor
(POIOLE2TextExtractor 接口中的getDocument)
getDocument
in interface
POITextExtractor
(接口 POITextExtractor 中的 getDocument)
public void setCloseFilesystem(boolean doCloseFilesystem)
setCloseFilesystem
in interface
POITextExtractor
(接口 POITextExtractor 中的 setCloseFilesystem)
doCloseFilesystem
-
true
(default), if underlying resources/filesystem should be closed on
POITextExtractor.close()
(doCloseFilesystem - true(默认),如果底层资源/文件系统应该在 POITextExtractor.close() 上关闭)
public boolean isCloseFilesystem()
isCloseFilesystem
in interface
POITextExtractor
(接口 POITextExtractor 中的 isCloseFilesystem)
true
, if resources/filesystem should be closed on
POITextExtractor.close()
(true,如果资源/文件系统应该在 POITextExtractor.close() 上关闭)
public HWPFOldDocument getFilesystem()
getFilesystem
in interface
POITextExtractor
(接口 POITextExtractor 中的 getFilesystem)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.