poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60102] Unable to write XWPFDocument opened from Http InputStream
Date Sat, 10 Sep 2016 05:51:27 GMT

Javen O'Neal <onealj@apache.org> changed:

           What    |Removed                     |Added
             Status|NEW                         |NEEDINFO

--- Comment #1 from Javen O'Neal <onealj@apache.org> ---
I am unable to reproduce this in the latest nightly build of POI (r1755847).

Could you either check this against 3.15-beta2 or later a nightly, or produce a
unit test that produces the error seen in comment 0?
Apache commons collections was recently added as a dependency and will need to
be added to your class path.

Here's my test case:

public void test60102() throws Exception {
    // read in from a java.io.File
    //XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("60102.docx");

    // or read in from a java.io.FileInputStream
    File infile = POIDataSamples.getDocumentInstance().getFile("60102.docx");
    InputStream fis = new FileInputStream(infile);
    XWPFDocument doc = new XWPFDocument(fis);

    // Write out to a file
    File outfile = TempFile.createTempFile("60102-resaved", "docx");
    OutputStream fos = new FileOutputStream(outfile);

    // Write out to a byte array output stream
    XWPFDocument doc2 = XWPFTestDataSamples.writeOutAndReadBack(doc);


You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message