Catch output stream of xsl result-document

前端 未结 3 790
北恋
北恋 2021-01-13 20:23

I need a way to interfere in writting xsl result documents to avoid writting them to file system. Right now my template is writting to a temporary directory, and then i zip

3条回答
  •  难免孤独
    2021-01-13 20:53

    You can use new StreamResult(ByteArrayOutputStream()) to catch xslt output, if you don't want to write to files, and then you can save memory data from byte array to zip file using this approach In Java: How to zip file from byte[] array?

提交回复
热议问题