1

i want to convert a ZipOutputStream into ZipInputStream using PipedOutputStream and PipedInputStream. I am receiving ZipOutputStream from DataHandler, and i don't want to write it on file and then open and read it, rather i want to convert this ZipOutputStream into ZipInputStream for my further processing, like extracting ZipEntry and save it in some file.

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

...
}

Any help will be appreciated... thanks

4

0 回答 0