i think there is a probleme with this method:
public static List unzip(InputStream is) {
List res = new ArrayList();
try {
ZipInputStream in = new ZipInputStream(is);
ZipEntry entry = null;
while ((entry = in.getNextEntry()) != null) {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
stream.write(buf, 0, len);
}
InputStream isEntry = new ByteArrayInputStream(stream
.toByteArray());
File file = File.createTempFile("tmp", "_" + entry.getName());
copyInputStream(isEntry, new BufferedOutputStream(
new FileOutputStream(file)));
res.add(file);
}
in.close();
} catch (IOException e) {
logger.error(e.getMessage());
}
return res;
}
in windows environment, it can't creat temp file if there are directories inside zip file!