From 654b24ef3649e892785a6ef3d75ae7853180dd67 Mon Sep 17 00:00:00 2001
From: Nick Burch <nick@apache.org>
Date: Tue, 24 Jan 2006 15:23:52 +0000
Subject: [PATCH] Expose the POIFSFileSystem constructor, so people who already
 have one find life easier

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@371938 13f79535-47bb-0310-9956-ffa450edef68
---
 .../src/org/apache/poi/hwpf/HWPFDocument.java        | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java b/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
index b635dbdfb5..e2fb4f3f7b 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
@@ -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");