Skip to main content

Posts

Showing posts with the label Uncompress GZip file
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();   } }