Here you can find the source of GetFileList(String zipFileString, boolean bContainFolder, boolean bContainFile)
public static List<File> GetFileList(String zipFileString, boolean bContainFolder, boolean bContainFile) throws Exception
//package com.java2s; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import android.util.Log; public class Main { public static List<File> GetFileList(String zipFileString, boolean bContainFolder, boolean bContainFile) throws Exception { Log.v("XZip", "GetFileList(String)"); List<File> fileList = new ArrayList<File>(); ZipInputStream inZip = new ZipInputStream(new FileInputStream( zipFileString));/*from w w w . j a va2 s .c o m*/ ZipEntry zipEntry; String szName = ""; while ((zipEntry = inZip.getNextEntry()) != null) { szName = zipEntry.getName(); if (zipEntry.isDirectory()) { // get the folder name of the widget szName = szName.substring(0, szName.length() - 1); File folder = new File(szName); if (bContainFolder) { fileList.add(folder); } } else { File file = new File(szName); if (bContainFile) { fileList.add(file); } } }// end of while inZip.close(); return fileList; } }