Here you can find the source of loadGZipObject(File file)
public static Object loadGZipObject(File file)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.util.zip.GZIPInputStream; public class Main { public static Object loadGZipObject(File file) { Object obj = null;/*from ww w .j av a 2s. c o m*/ FileInputStream fis = null; GZIPInputStream gis = null; ObjectInputStream ois = null; try { fis = new FileInputStream(file); gis = new GZIPInputStream(fis); ois = new ObjectInputStream(gis); obj = ois.readObject(); ois.close(); gis.close(); fis.close(); } catch (IOException ioe) { ioe.printStackTrace(); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } return obj; } }