Package org.apache.poi.hwpf.extractor
Class Word6Extractor
java.lang.Object
org.apache.poi.hwpf.extractor.Word6Extractor
- All Implemented Interfaces:
Closeable,AutoCloseable,POIOLE2TextExtractor,POITextExtractor
Class to extract the text from old (Word 6 / Word 95) Word Documents.
This should only be used on the older files, for most uses you
should call
WordExtractor which deals properly
with HWPF.-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new Word ExtractorCreate a new Word ExtractorWord6Extractor(DirectoryNode dir, POIFSFileSystem fs) Deprecated.Create a new Word Extractor -
Method Summary
Modifier and TypeMethodDescriptionReturn the underlying POIDocumentString[]Deprecated.getText()Retrieves all the text from the document.booleanvoidsetCloseFilesystem(boolean doCloseFilesystem) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.extractor.POIOLE2TextExtractor
getDocSummaryInformation, getMetadataTextExtractor, getRoot, getSummaryInformationMethods inherited from interface org.apache.poi.extractor.POITextExtractor
close
-
Constructor Details
-
Word6Extractor
Create a new Word Extractor- Parameters:
is- InputStream containing the word file- Throws:
IOException
-
Word6Extractor
Create a new Word Extractor- Parameters:
fs- POIFSFileSystem containing the word file- Throws:
IOException
-
Word6Extractor
Deprecated.UseWord6Extractor(DirectoryNode)instead- Throws:
IOException
-
Word6Extractor
- Throws:
IOException
-
Word6Extractor
Create a new Word Extractor- Parameters:
doc- The HWPFOldDocument to extract from
-
-
Method Details
-
getParagraphText
Deprecated.Get the text from the word file, as an array with one String per paragraph -
getText
Description copied from interface:POITextExtractorRetrieves all the text from the document. How cells, paragraphs etc are separated in the text is implementation specific - see the javadocs for a specific project for details.- Specified by:
getTextin interfacePOITextExtractor- Returns:
- All the text from the document
-
getDocument
Description copied from interface:POIOLE2TextExtractorReturn the underlying POIDocument- Specified by:
getDocumentin interfacePOIOLE2TextExtractor- Specified by:
getDocumentin interfacePOITextExtractor- Returns:
- the underlying POIDocument
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem) - Specified by:
setCloseFilesystemin interfacePOITextExtractor- Parameters:
doCloseFilesystem-true(default), if underlying resources/filesystem should be closed onPOITextExtractor.close()
-
isCloseFilesystem
public boolean isCloseFilesystem()- Specified by:
isCloseFilesystemin interfacePOITextExtractor- Returns:
true, if resources/filesystem should be closed onPOITextExtractor.close()
-
getFilesystem
- Specified by:
getFilesystemin interfacePOITextExtractor- Returns:
- The underlying resources/filesystem
-
Word6Extractor(DirectoryNode)instead