here is my code:
final InputStream inputStream = MY_RECEIVED_INPUT_STREAM;
ZipInputStream zis = new ZipInputStream(inputStream);
ZipEntry zipEntry = zis.getNextEntry();
while (zipEntry != null) {
zipEntry = zis.getNextEntry();
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
zis.closeEntry();
zis.close();
I receive zip file with many files inside. I want to write these files to database. What I want is to get bytes from each and every ZipEntry and save them to database as Blob (xxxxxx.... part). How can I get bytes from zipEntry? I don't have ZipFile, so I can't use something like this:
InputStream stream = zipFile.getInputStream(entry);
or
byte[] bytes = IOUtils.readAllBytes(zipFile.getInputStream(entry));
Thanks in advance.