Read directly a file within a Zip file - Java

后端 未结 3 1892
一个人的身影
一个人的身影 2020-12-19 12:31

My situation is that I have a zip file that contains some files (txt, png, ...) and I want to read it directly by their names, I have tested the following code but no result

3条回答
  •  借酒劲吻你
    2020-12-19 13:03

    What is the path of the test.txt within the zip file? You need to use the path within the zip file to read this file. Also make sure that your zipfile is in the classpath. In fact, you can bundle this in a jar file.

提交回复
热议问题