我正在开发一个应用程序,将.epub文件解压缩到Android中的SDCARD.我已经阅读了无法解压缩的EPub文件 TOPIC. 它适用于.zip文件但不适用于.epub文件.可以告诉我问题出在哪里?这是异常日志:
03-21 13:35:44.281: W/System.err(1255): java.io.FileNotFoundException: /mnt/sdcard/unzipped11/META-INF/container.xml: open failed: ENOENT (No such file or directory)
Run Code Online (Sandbox Code Playgroud)
我正在使用此代码:
private void decom() throws IOException {
ZipFile zipFile = new ZipFile(Environment.getExternalStorageDirectory()+"/dir.zip");
String path = Environment.getExternalStorageDirectory() + "/unzipped10/";
Enumeration<?> files = zipFile.entries();
_dirChecker("");
while (files.hasMoreElements()) {
ZipEntry entry = (ZipEntry) files.nextElement();
Log.v("ZipEntry", ""+entry);
Log.v("isDirectory", ""+entry.isDirectory());
if (entry.isDirectory()) {
File file = new File(path + entry.getName());
file.mkdir();
System.out.println("Create dir " + entry.getName());
} else {
File f = new File(path + entry.getName());
FileOutputStream …Run Code Online (Sandbox Code Playgroud)