我想使用PipedOutputStream和PipedInputStream将ZipOutputStream转换为ZipInputStream。我从DataHandler接收ZipOutputStream,我不想在文件上写它然后打开并读取它,而是我想将这个ZipOutputStream转换为ZipInputStream以供我进一步处理,比如提取ZipEntry并将其保存在某个文件中。 / p>
public String documentReceived(@WebParam(name = "document")final DataHandler dataHandler) {
...
ZipOutputStream zout = new ZipOutputStream(dataHandler.getOutputStream());
final PipedInputStream pin = new PipedInputStream();
final PipedOutputStream pout = new PipedOutputStream(pin);
??? need help here to convert a ZipOutputStream into
??? ZipInputStream
...
}
任何帮助将不胜感激...谢谢