org.apache.poi
Class POITextExtractor
- java.lang.Object
-
- org.apache.poi.POITextExtractor
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
- Direct Known Subclasses:
- HPSFPropertiesExtractor, POIOLE2TextExtractor, POIXMLTextExtractor
public abstract class POITextExtractor extends java.lang.Object implements java.io.CloseableCommon Parent for Text Extractors of POI Documents. You will typically find the implementation of a given format's text extractor under org.apache.poi.[format].extractor .- See Also:
ExcelExtractor,org.apache.poi.hslf.extractor.PowerPointExtractor,org.apache.poi.hdgf.extractor.VisioTextExtractor,org.apache.poi.hwpf.extractor.WordExtractor
-
-
Constructor Summary
Constructors Constructor and Description POITextExtractor(POIDocument document)Creates a new text extractor for the given document
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidclose()Allows to free resources of the Extractor as soon as it is not needed any more.abstract POITextExtractorgetMetadataTextExtractor()Returns another text extractor, which is able to output the textual content of the document metadata / properties, such as author and title.abstract java.lang.StringgetText()Retrieves all the text from the document.
-
-
-
Constructor Detail
-
POITextExtractor
public POITextExtractor(POIDocument document)
Creates a new text extractor for the given document
-
-
Method Detail
-
getText
public abstract java.lang.String getText()
Retrieves 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.- Returns:
- All the text from the document
-
getMetadataTextExtractor
public abstract POITextExtractor getMetadataTextExtractor()
Returns another text extractor, which is able to output the textual content of the document metadata / properties, such as author and title.
-
close
public void close() throws java.io.IOExceptionAllows to free resources of the Extractor as soon as it is not needed any more. This may include closing open file handles and freeing memory. The Extractor cannot be used after close has been called.- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG