I have an ZipInputStream made from a byte array , I can iterate through the zipInputStream ZipEntrys but I cant find a method to get the data from the ZipEntry (ZipENtry.getExtras() is null on every entry) how would i go to extract all the files one by one each one to a specific location on my disk ?
try {
ZipInputStream zipInputStream = new ZipInputStream(zip.getBody().getInputStream());
ZipEntry temp;
while((temp = zipInputStream.getNextEntry()) != null){
File outputFile = new File(temp.getName());
try (FileOutputStream outputStream = new FileOutputStream(outputFile)) {
System.out.println(temp.getName());
}
}
} catch (IOException e) {
e.printStackTrace();
}