サーバからZipをダウンロードし、一時ファイルとして保存、
解凍をするというプログラムを書いています。
zipファイルの保存はできたのですが、そこからの解凍で躓いています。
String filename = "/sdcard/hogehoge.zip"
ZipInputStream in = null;
FileInputStream fin =null;
BufferedOutputStream out = null;
File outDir = new File(filename);ZipEntry zipEntry = null; int len = 0; List<String> list = new ArrayList<String>(); try { in = new ZipInputStream(new BufferedInputStream(new FileInputStream(filename))); // ZIPファイルに含まれるエントリに対して順にアクセス try { while ((zipEntry = in.getNextEntry()) != null) { if (zipEntry.isDirectory()) { } else { File newfile = new File(zipEntry.getName()); // 出力用ファイルストリームの生成 FileOutputStream file = new FileOutputStream(context.getFilesDir() + "/" +
newfile.getName());
こちらのin.getNextEntry()でエラーが発生し、EOFExceptionの例外でアプリが落ちます。
何卒ご教授の程お願い致します。