You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2019/03/06 15:58:56 UTC

[Bug 57342] Writing very large file via SXSSF leads to corrupt file

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