0
다음 코드를 사용하여 파일을 압축 해제합니다.ZIpFile로 파일 압축 해제
"unZip() = java.io.IOException"예외를 catch하고 있지만 파일의 압축이 풀리고 생성되었습니다!
아이디어가 있으십니까?
감사합니다.
public boolean unZipPage(int page)
{
try
{
File f=new File(zippagename);
FileOutputStream out = new FileOutputStream(f);
ZipEntry fh=fhs.get(page);
InputStream is = zif.getInputStream(fh);
byte buf[] = new byte[1024];
int numread;
while((numread = is.read(buf,0,1024))>=0)
{
out.write(buf, 0, numread);
}
is.close();
out.flush();
out.close();
}
return true;
}
catch (FileNotFoundException e)
{
Log.v("comicsZip", "unZip()=" + e);
}
catch (IOException e)
{
Log.v("comicsZip", "unZip()=" + e + " Page="+page);
}
return false;
}
e.printStackTrace() 및/또는 e.getMessage()를 수행하고 내용을 확인하십시오. 긴 메시지는 문제를 설명 할 수 있습니다. –
예외가 발생하는 곳을 확인하십시오 ........ – Dinash