결국, 원래 계획 한대로 너무 많은 메모리를 사용했습니다! 대신 한 번에 하나의 ZipEntry를 사용하는 것으로 끝났지 만 매번마다 매번 루프를 돌릴 필요가 없었습니다.
public Bitmap getBitmapFromZip(final String zipFilePath, final String imageFileInZip){
Bitmap result = null;
try {
ZipEntry ze = zipfile.getEntry(imageFileInZip);
InputStream in = zipfile.getInputStream(ze);
result = BitmapFactory.decodeStream(in);
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
return result;
}는 그냥 그러나 그것은 얻을 수 없다, 시작 부분을 통해 빠르게 루프 모든 이름
public ArrayList<String> unzip() {
ArrayList<String> fnames = ArrayList<String>();
try {
FileInputStream fin = new FileInputStream(_zipFile);
ZipInputStream zin = new ZipInputStream(fin);
ZipEntry ze = null;
while ((ze = zin.getNextEntry()) != null) {
if(ze.isDirectory()) {
} else {
fnames.add(ze.getName()/*fname[fname.length - 1]*/);
zin.closeEntry();
}
}
zin.close();
} catch(Exception e) {
}
return fnames;
}
나는 비트 맵 배열에 이미지를 넣어하는 방법 중 하나를 발견
를 얻을 수에 있었다 4 또는 5 번 이미지에서 전체 지퍼를 통해 BitmapFactory.decodeStream (zis) 중에 항상 충돌합니다. – tantonj