import java.io.File;
import java.io.IOException;
import java.util.Enumeration;
import java.util.zip.ZipFile;
public class ZipContents {
public static void main(String[] args) {
File zipFileName = new File("src\\myZip.zip");
getContentsInZip(zipFileName);
}
public static void getContentsInZip(File zipFileName){
try{ ZipFile zipFile = new ZipFile(zipFileName);
Enumeration em = zipFile.entries();
for (Enumeration enumer = zipFile.entries(); enumer.hasMoreElements();) {
System.out.println(enumer.nextElement());
}
}catch(IOException e){ e.printStackTrace(); }
}
}
Sunday, July 5, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
You can put your comments here (Either feedback or your Question related to blog)