Hi,
I have to pass an InputStream as a parameter to a 3rd party library, which will read the complete contents from the InputStream and do its job.
My problem is, some of my files are Zip files - with more than one ZipEntry. From what I understand, one can read one zipEntry at a time and then do a zipInputStream.getNextEntry() and then again read and so on. But, the 3rd party library doesn't understand this and expects a single InputStream. All the zipEntries of a zip file should be available as a single inputStream.
Please enlighten me as to how to do it. I cannot use ZipFile as the file is not stored locally (in a different server). I also cannot read all zipEntries and construct a ByteArrayOutputStream or a string as the files can be very big and that will spike memory usage.
I want a way to let one inputStream read from multiple zip entries of a single zip file transparantly.
thanks in advance, Prasanna