|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.POITextExtractor
org.apache.poi.POIOLE2TextExtractor
org.apache.poi.hwpf.extractor.WordExtractor
public final class WordExtractor
Class to extract the text from a Word Document. You should use either getParagraphText() or getText() unless you have a strong reason otherwise.
| Constructor Summary | |
|---|---|
WordExtractor(org.apache.poi.poifs.filesystem.DirectoryNode dir)
|
|
WordExtractor(org.apache.poi.poifs.filesystem.DirectoryNode dir,
org.apache.poi.poifs.filesystem.POIFSFileSystem fs)
Deprecated. Use WordExtractor(DirectoryNode) instead |
|
WordExtractor(HWPFDocument doc)
Create a new Word Extractor |
|
WordExtractor(java.io.InputStream is)
Create a new Word Extractor |
|
WordExtractor(org.apache.poi.poifs.filesystem.POIFSFileSystem fs)
Create a new Word Extractor |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getCommentsText()
|
java.lang.String[] |
getEndnoteText()
|
java.lang.String |
getFooterText()
Grab the text from the footers |
java.lang.String[] |
getFootnoteText()
|
java.lang.String |
getHeaderText()
Grab the text from the headers |
java.lang.String[] |
getMainTextboxText()
|
java.lang.String[] |
getParagraphText()
Get the text from the word file, as an array with one String per paragraph |
java.lang.String |
getText()
Grab the text, based on the WordToTextConverter. |
java.lang.String |
getTextFromPieces()
Grab the text out of the text pieces. |
static void |
main(java.lang.String[] args)
Command line extractor, so people will stop moaning that they can't just run this. |
static java.lang.String |
stripFields(java.lang.String text)
Removes any fields (eg macros, page markers etc) from the string. |
| Methods inherited from class org.apache.poi.POIOLE2TextExtractor |
|---|
getDocSummaryInformation, getFileSystem, getMetadataTextExtractor, getRoot, getSummaryInformation |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WordExtractor(java.io.InputStream is)
throws java.io.IOException
is - InputStream containing the word file
java.io.IOException
public WordExtractor(org.apache.poi.poifs.filesystem.POIFSFileSystem fs)
throws java.io.IOException
fs - POIFSFileSystem containing the word file
java.io.IOException
public WordExtractor(org.apache.poi.poifs.filesystem.DirectoryNode dir,
org.apache.poi.poifs.filesystem.POIFSFileSystem fs)
throws java.io.IOException
WordExtractor(DirectoryNode) instead
java.io.IOException
public WordExtractor(org.apache.poi.poifs.filesystem.DirectoryNode dir)
throws java.io.IOException
java.io.IOExceptionpublic WordExtractor(HWPFDocument doc)
doc - The HWPFDocument to extract from| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String[] getParagraphText()
public java.lang.String[] getFootnoteText()
public java.lang.String[] getMainTextboxText()
public java.lang.String[] getEndnoteText()
public java.lang.String[] getCommentsText()
public java.lang.String getHeaderText()
public java.lang.String getFooterText()
public java.lang.String getTextFromPieces()
public java.lang.String getText()
getText in class org.apache.poi.POITextExtractorpublic static java.lang.String stripFields(java.lang.String text)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||