1.压缩包有200mb,正好需要解析的文件在最后,读取文件内容很慢
private String getSystemUpgradeVersion() {
String zipFile = "mnt/sdcard/update.zip";
File f = new File(zipFile);
if (!f.exists()) {
return "";
}
try {
ZipFile zf = new ZipFile(zipFile);
InputStream in = new BufferedInputStream(new FileInputStream(
zipFile));
ZipInputStream zin = new ZipInputStream(in);
ZipEntry ze;
while ((ze = zin.getNextEntry()) != null) {
if (!ze.isDirectory()) {
if (ze.getName().equals("version")) {
break;
}
}
}
if (zf == null || ze == null) {
return "";
}
BufferedReader br = new BufferedReader(new Inpu