]> source.dussan.org Git - poi.git/commitdiff
Expose the POIFSFileSystem constructor, so people who already have one find life...
authorNick Burch <nick@apache.org>
Tue, 24 Jan 2006 15:23:52 +0000 (15:23 +0000)
committerNick Burch <nick@apache.org>
Tue, 24 Jan 2006 15:23:52 +0000 (15:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@371938 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java

index b635dbdfb5c35b0f7fa3805c347268d39528bd53..e2fb4f3f7bd9e4644786a5aa312e35e456969031 100644 (file)
@@ -104,8 +104,18 @@ public class HWPFDocument
   public HWPFDocument(InputStream istream) throws IOException
   {
     //do Ole stuff
-    POIFSFileSystem filesystem = new POIFSFileSystem(istream);
+    this( new POIFSFileSystem(istream) );
+  }
 
+  /**
+   * This constructor loads a Word document from a POIFSFileSystem
+   *
+   * @param filesystem The POIFSFileSystem that contains the Word document.
+   * @throws IOException If there is an unexpected IOException from the passed
+   *         in POIFSFileSystem.
+   */
+  public HWPFDocument(POIFSFileSystem filesystem) throws IOException
+  {
     // read in the main stream.
     DocumentEntry documentProps =
        (DocumentEntry)filesystem.getRoot().getEntry("WordDocument");