poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57342] Writing very large file via SXSSF leads to corrupt file
Date Wed, 06 Mar 2019 15:58:56 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=57342

--- Comment #30 from krzysztof.rzymkowski@gmail.com ---
@PJ_Fanning Sure, but I'm not fully clear on what you mean by "submit to us".
Do you mean submit to Apache POI source repo, Apache Incubator or via
https://projects.apache.org/create.html? Could you point me to what the next
steps would be.

Here's a least invasive scenario:
Allow to tap into SXSSFWorkbook.injectData() [1], to provide own implementation
of  ZipArchiveOutputStream. For example via introducing protected
createZipOutputStream() method.
I could provide an OpcOutputStream wrapper extending ZipArchiveOutputStream.
Just like I did with ZipOutputStream [2]. 
Then to create SXSSFWorkbook with >4GB sheet support, you would:

SXSSFWorkbook wb = new SXSSFWorkbook() {
  protected ZipArchiveOutputStream createZipOutputStream(OutputStream out) {
     return new OpcZipArchiveOutputStream(out);
  }
}

[1]
https://github.com/apache/poi/blob/cdbda8e615610b960844e58b89f51cf304ce00c6/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java#L388
[2]
https://github.com/rzymek/opczip/blob/master/src/main/java/com/github/rzymek/opczip/OpcZipOutputStream.java

-- 
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


Mime
View raw message