• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GZipInputStream & ZipInputStream?

 
Andrew Mcmurray
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,

I am trying to stream data from zip files. Everything works fine when I get Gzip files and use the GZipInputStream. When I use the same code and switch the GZipInputStream to ZipInputStream it does not work. It looks like the first line being read in a null? Any thoughts? Here is a snip of code I am useing



Thanks,

AMD
 
Joe Ess
Bartender
Posts: 9318
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gzip and Zip files have different formats and require different handling. Have a look at this Zip example and compare it to this Gzip example.
 
Andrew Mcmurray
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah so I am guessing I need to add the ZipEntry entry = in.getNextEntry();
to clear the null that I am getting on the first line?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic