read « Zip « Java I/O Q&A

1. Help in creating Zip files from .Net and reading them from Java

I'm trying to create a Zip file from .Net that can be read from Java code. I've used SharpZipLib to create the Zip file but also if the file generated is valid ...

2. reading zipx in java

Any suggestions for a tool/object/utility to read a .zipx file in java? Have already looked at and

3. Reading ZIP file gives an 'invalid LOC header' Exception

I have a large zip file, 4.3G. It contains about 100k entries. I am reading it using Java 1.6.0_14 on Linux, Ubuntu 32 bit, and get the following exception. invalid LOC ...

4. How to read and write a zip file in java?

I am doing a practice to understand read and write zip files in java. I'd read about reading a file and making it to zip file, and i have also tried. ...

5. using java api from clojure, reading zip file

Good day. I trying to rewrite following snippet un clojure, but it all comes ugly, maybe someone will suggest more elegant solution ?


public class ZipFileRdrExp {


6. How to read zipped xml files using java

I am having a zip file with lot of xml files. I am having some data which I have to check with the xml files content and which ever xml file ...

7. How can I read files from ZIp file to memory with Java?

I found example from SUN site (, but it returns BufferedOutputStream. But I would like to get ZipEntry file as InputStream and then process next file. Is that possible? My program ...

8. Reading Last *n* lines from GZIPInputStream

I am reading a huge txt file inside zip.

GZIPInputStream fstream = new GZIPInputStream(new FileInputStream(zipfile));
BufferedReader breader = new BufferedReader(new InputStreamReader(fstream));
I need to read last n lines, of the file. Is it possible to ...

9. Reading a zip file

Hi, I would like to be able to read the contents of a .zip file placed on a server from within an applet. Currently the code below... String text=""; try { JarFile jf=new JarFile(""); Enumeration e=jf.entries(); while(e.hasMoreElements()) { JarEntry je=(JarEntry)e.nextElement(); String name=je.getName(); text+=name+","; } } catch(Exception e){System.out.println("ERROR="+e.getMessage());} Reads the contents of (code and zip file on desktop) and adds it ...

10. Reading a zip file

11. Is it possible to read and run files directly from a zip file?

Is it possible to create a zip file and use it like a regular directory structure? I would like to be able to store all my files directly to the zip file and read my files directly from it as well. Or is there some alternative? Basically I need to have a bunch of files together in one central location. But ...

12. ZIP File reading

Let's say you have a Zip File and you want to read it. You just take the ZipFile and .getInputStream(ZipEntry). Well, let's say the entry you want to read is a zip file, itself. Well, you: ZipInputStream inputStream = new ZipInputStream((zipFileHere).getInputStream(ZipEntry)). And then you read from there. Now, let's say you have a triple nested zip file. That is to say, ...

13. Read Zip File

Hi, I have one zip file and want to read it file by file can you please tell me how can I achieve this??? OR Can anyone please tell me about how can I get absolute path of the file which is resided in the zip file For example, if I have an zip file which contains 4 zip files ...

14. Reading files from ZIP in memory

Hi, I need to extract some files from a ZIP archive which will be in memory, accessed with an InputStream (ByteArray). As ZIP files are likely to be large, I'd like to have some sort of "random access" in the way java.util.ZipFile does, allowing me to access any file directly without having to iterate through all the entries. Unfortunately, ZipFiles can ...

15. Problem reading zip from war file

I've figured out that the File object isn't being created when the mywar.war! syntax is in play. It seems that the URL class understands that jar file syntax but the File class doesn't? The URL class only give me the object as a stream, from which I can't figure out to create a ZipFile. How should I go about going from ...

16. Reading raw bytes from .zip file

17. Read serialized java Object from Zip

18. Zip file reading?

19. Zip read exception

20. JVM Setting for performance as reading zip files.....??

I am not too familiar with VM options but I noticed that reading from Zip files is pretty process intensive. I am basically searching through zip files to find a file and then taking that inputstream for processing. I am basically looping through the zip file until i match the filename....pretty crazy. Anyway, it is somewhat slower than I'd like so ...

21. Read Properties of file in ZIP

You're creating a File object to read the zip entry's contents. I think that's wrong -- the zip entry doesn't exist as a file on disk. I believe the way you're supposed to get the contents of a zip entry is to use ZipFile.getInputStream(ZipEntry). You could then pass the returned InputStream to Properties.load().

22. Reading / Unzipping a ZIP file

Hey people I'm trying to write something that will read through a zip file...or perhaps extract its contents first. The problem is that the zip file itself contains many other zip files and extracting them all manually will be way too tedious. I'm not that familiar with Zip files beyond that of simple zipping and unzipping via the mouse. Is there ...

23. Zip file read problem