I'm trying to make a function that takes in a zip file name as a String and prints everything in it. I have made it so that i need the actual zip file but I do not know how to turn the String into a zip file.
public void zipInput(ZipFile zipFile) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry e = entries.nextElement();
try {
InputStream is = zipFile.getInputStream(e);
System.out.println(is);
} catch (IOException e1) {
e1.printStackTrace();
}
}
}