| java.lang.Object org.apache.poi.hslf.extractor.QuickButCruddyTextExtractor
QuickButCruddyTextExtractor | public class QuickButCruddyTextExtractor (Code) | | This class will get all the text from a Powerpoint Document, including
all the bits you didn't want, and in a somewhat random order, but will
do it very fast.
The class ignores most of the hslf classes, and doesn't use
HSLFSlideShow. Instead, it just does a very basic scan through the
file, grabbing all the text records as it goes. It then returns the
text, either as a single string, or as a vector of all the individual
strings.
Because of how it works, it will return a lot of "crud" text that you
probably didn't want! It will return text from master slides. It will
return duplicate text, and some mangled text (powerpoint files often
have duplicate copies of slide text in them). You don't get any idea
what the text was associated with.
Almost everyone will want to use @see PowerPointExtractor instead. There
are only a very small number of cases (eg some performance sensitive
lucene indexers) that would ever want to use this!
author: Nick Burch |
QuickButCruddyTextExtractor | public QuickButCruddyTextExtractor(String fileName) throws IOException(Code) | | Creates an extractor from a given file name
Parameters: fileName - |
QuickButCruddyTextExtractor | public QuickButCruddyTextExtractor(InputStream iStream) throws IOException(Code) | | Creates an extractor from a given input stream
Parameters: iStream - |
QuickButCruddyTextExtractor | public QuickButCruddyTextExtractor(POIFSFileSystem poifs) throws IOException(Code) | | Creates an extractor from a POIFS Filesystem
Parameters: poifs - |
findTextRecords | public int findTextRecords(int startPos, Vector textV)(Code) | | For the given position, look if the record is a text record, and wind
on after.
If it is a text record, grabs out the text. Whatever happens, returns
the position of the next record, or -1 if no more.
|
getTextAsString | public String getTextAsString()(Code) | | Fetches the ALL the text of the powerpoint file, as a single string
|
getTextAsVector | public Vector getTextAsVector()(Code) | | Fetches the ALL the text of the powerpoint file, in a vector of
strings, one per text record
|
main | public static void main(String args) throws IOException(Code) | | Really basic text extractor, that will also return lots of crud text.
Takes a single argument, the file to extract from
|
|
|