It is a feature of the OpenXml4J library. XSSFWorkbook.write builds the model and delegates actual saving to OPCPackage.save(OutputStream) where the initial stream is wrapped with ZipOutputStream:
ZipOutputStream zos = new ZipOutputStream(outputStream); // write data zos.close(); // this is where outputStream is closed. The exact place is ZipPackage.saveImpl(OutputStream). This is pretty fundamental and I don't think it can be easily changed. Yegor On Tue, Oct 4, 2011 at 11:27 PM, Jim Talbut <[email protected]> wrote: > Hi, > > XSSFWorkbook.write(OutputStream) closes the stream, whilst > HSSFWorkbook.write(OutputStream) doesn't. > > Is this intentional? Unavoidable because of third party libraries? > > Thanks. > > Jim > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
