Here you can find the source of GetFileList( String zipFileString, boolean bContainFolder, boolean bContainFile)
public static java.util.List<java.io.File> GetFileList( String zipFileString, boolean bContainFolder, boolean bContainFile) throws Exception
//package com.java2s; //License from project: Open Source License public class Main { public static java.util.List<java.io.File> GetFileList( String zipFileString, boolean bContainFolder, boolean bContainFile) throws Exception { android.util.Log.v("XZip", "GetFileList(String)"); java.util.List<java.io.File> fileList = new java.util.ArrayList<java.io.File>(); java.util.zip.ZipInputStream inZip = new java.util.zip.ZipInputStream( new java.io.FileInputStream(zipFileString)); java.util.zip.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); java.io.File folder = new java.io.File(szName); if (bContainFolder) { fileList.add(folder); }//ww w .j ava2s.c o m } else { java.io.File file = new java.io.File(szName); if (bContainFile) { fileList.add(file); } } }//end of while inZip.close(); return fileList; } }