Here you can find the source of deserializeGZip(byte[] buf, T obj)
public static <T extends Externalizable> void deserializeGZip(byte[] buf, T obj)
//package com.java2s; //License from project: Open Source License import java.io.*; import java.util.zip.GZIPInputStream; public class Main { public static <T extends Externalizable> void deserializeGZip(byte[] buf, T obj) { try {// w w w .j a v a 2 s. c om deserializeGZipSafe(buf, obj); } catch (Exception e) { throw new RuntimeException(e); } } public static <T extends Externalizable> void deserializeGZipSafe(byte[] buf, T obj) throws IOException, ClassNotFoundException { ByteArrayInputStream bis = null; try { bis = new ByteArrayInputStream(buf); GZIPInputStream gzip = null; try { gzip = new GZIPInputStream(bis); ObjectInputStream oin = null; try { oin = new ObjectInputStream(gzip); obj.readExternal(oin); } finally { if (oin != null) { try { oin.close(); } catch (IOException e) { /* NOP */ } } } } finally { if (gzip != null) { try { gzip.close(); } catch (IOException e) { /* NOP */ } } } } finally { if (bis != null) { try { bis.close(); } catch (IOException e) { /* NOP */ } } } } }