Get All Entries From Zip File - Java File Path IO

Java examples for File Path IO:Zip File

Description

Get All Entries From Zip File

Demo Code


import java.io.IOException;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

public class Main {

  public static void main(String args[]) {
    try {/*from   ww w. j a v a  2s. c o m*/
      ZipFile zipFile = new ZipFile("c:/Folder/Files.zip");

      Enumeration e = zipFile.entries();
      zipFile.close();

    } catch (IOException ioe) {
      System.out.println("Error opening zip file" + ioe);
    }
  }
}

Result


Related Tutorials