android中zip文件解压
public class ZipUtil {
/**
* 解压到指定路径
*
* @param inputStream
* @param outPathString
* @throws Exception
*/
public static void UnZipFolder(InputStream inputStream, String outPathString) throws Exception {
ZipInputStream inZip = new ZipInputStream(inputStream);
ZipEntry zipEntry;
String szName = "";
File root = new File(outPathString);
if (!root.exists()) {
root.mkdir();
}
while ((zipEntry = inZip.getNextEntry()) != null) {
szName = zipEntry.getName();
if (zipEntry.isDirectory()) {
//获取部件的文件夹名
szName = szName.substring(0, szName.length() - 1);
File folder = new File(outPathString + File.separator + szName);
folder.mkdirs();
} el