Here you can find the source of unGzip(File sourceZipFile, String destFolder, String destFile)
public static void unGzip(File sourceZipFile, String destFolder, String destFile) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.GZIPInputStream; public class Main { private static final int BUFFER_SIZE = 8 * 1024; public static void unGzip(File sourceZipFile, String destFolder, String destFile) throws IOException { byte[] buffer = new byte[BUFFER_SIZE]; FileInputStream fileIn = new FileInputStream(sourceZipFile); GZIPInputStream gZIPInputStream = new GZIPInputStream(fileIn); FileOutputStream fileOutputStream = new FileOutputStream(destFolder + "/" + destFile); int bytes_read; while ((bytes_read = gZIPInputStream.read(buffer)) > 0) { fileOutputStream.write(buffer, 0, bytes_read); }/* www.j a v a 2s . com*/ gZIPInputStream.close(); fileOutputStream.close(); } }