Author: nick
Date: Tue Jan 24 07:23:52 2006
New Revision: 371938
URL: http://svn.apache.org/viewcvs?rev=371938&view=rev
Log:
Expose the POIFSFileSystem constructor, so people who already have one find
life easier
Modified:
jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
Modified:
jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
URL:
http://svn.apache.org/viewcvs/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java?rev=371938&r1=371937&r2=371938&view=diff
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
(original)
+++ jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
Tue Jan 24 07:23:52 2006
@@ -104,8 +104,18 @@
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");
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/