Uncompress GZip file package com.pukhraj.blog; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.OutputStream; import java.util.zip.GZIPInputStream; public class UncompressGZip { public static void main(String[] argv) throws Exception { String source = "path/FileName.gzip"; GZIPInputStream in = new GZIPInputStream(new FileInputStream(source)); String target = "path/outfilename"; OutputStream out = new FileOutputStream(target); byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } in.close(); out.close(); } }
Why does Java suck so much? Nope, It's too easy, If you have some experience. Is Java a dying technology? Nope, It's an stable language. Is Java good or bad? Very Good.