diff --git a/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java b/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java index 8db7382e9..5b1c3d5a5 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java @@ -66,8 +66,8 @@ public class PowerPointExtractor } /** - * Creates a PowerPointExtractor - * @param fileName + * Creates a PowerPointExtractor, from a file + * @param fileName The name of the file to extract from */ public PowerPointExtractor(String fileName) throws IOException { _hslfshow = new HSLFSlideShow(fileName); @@ -77,8 +77,8 @@ public class PowerPointExtractor } /** - * Creates a PowerPointExtractor - * @param iStream + * Creates a PowerPointExtractor, from an Input Stream + * @param iStream The input stream containing the PowerPoint document */ public PowerPointExtractor(InputStream iStream) throws IOException { _hslfshow = new HSLFSlideShow(iStream); @@ -88,8 +88,8 @@ public class PowerPointExtractor } /** - * Creates a PowerPointExtractor - * @param fs + * Creates a PowerPointExtractor, from an open POIFSFileSystem + * @param fs the POIFSFileSystem containing the PowerPoint document */ public PowerPointExtractor(POIFSFileSystem fs) throws IOException { _hslfshow = new HSLFSlideShow(fs); @@ -98,6 +98,17 @@ public class PowerPointExtractor _notes = _show.getNotes(); } + /** + * Creates a PowerPointExtractor, from a HSLFSlideShow + * @param ss the HSLFSlideShow to extract text from + */ + public PowerPointExtractor(HSLFSlideShow ss) throws IOException { + _hslfshow = ss; + _show = new SlideShow(_hslfshow); + _slides = _show.getSlides(); + _notes = _show.getNotes(); + } + /** * Shuts down the underlying streams diff --git a/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java b/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java index 5be1b8f8a..d34fa78c2 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java @@ -36,8 +36,16 @@ public class WordExtractor { * @param fs POIFSFileSystem containing the word file */ public WordExtractor(POIFSFileSystem fs) throws IOException { + this(new HWPFDocument(fs)); this.fs = fs; - doc = new HWPFDocument(fs); + } + + /** + * Create a new Word Extractor + * @param doc The HWPFDocument to extract from + */ + public WordExtractor(HWPFDocument doc) throws IOException { + this.doc = doc; } /**