FileOutputStream throws FileNotFoundException when UnZipping

前端 未结 7 1789
温柔的废话
温柔的废话 2020-12-11 04:19

I\'m using a class that I found through google to unzip a .zip file.. The .zip contains files and folder. The problem is that FileOutputStream throws

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-11 04:56

    From the javadocs for the FileOutputStream constructor

    Throws:
    FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason

    Often, a FileNotFoundException occurs if you do not have permissions to create files or that part of the file system is read-only (though I'm not sure to what extent this applies in Android)

提交回复
热议问题