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
This commit is contained in:
parent
c7b02dda46
commit
f0ce2543b1
@ -104,8 +104,18 @@ public class HWPFDocument
|
|||||||
public HWPFDocument(InputStream istream) throws IOException
|
public HWPFDocument(InputStream istream) throws IOException
|
||||||
{
|
{
|
||||||
//do Ole stuff
|
//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.
|
// read in the main stream.
|
||||||
DocumentEntry documentProps =
|
DocumentEntry documentProps =
|
||||||
(DocumentEntry)filesystem.getRoot().getEntry("WordDocument");
|
(DocumentEntry)filesystem.getRoot().getEntry("WordDocument");
|
||||||
|
Loading…
Reference in New Issue
Block a user