code: public static File decodeGZToTemp(String uriGZ) throws IOException {
  		final int BUFFER_SIZE = 8192;
  
  		Stream stream = null;
  
  		try {
  			stream = GeneralURIStreamFactory.createStream(uriGZ);
  			InputStream input = new StreamWrappedInputStream(stream);
  			input = new OpenJDK7GZIPInputStream(input);
  
  			File uncompressedCdx = File.createTempFile(uriGZ, ".cdx");
  			FileOutputStream out = new FileOutputStream(uncompressedCdx, false);
  
  			byte buff[] = new byte[BUFFER_SIZE];
  			int numRead = 0;
  			
  			while ((numRead = input.read(buff)) > 0) {
  				out.write(buff, 0, numRead);
  			}
  			
  			out.flush();
  			out.close();
  			
  			return uncompressedCdx;
  			
  		} finally {
  			if (stream != null) {
  				stream.close();
  			}
  		}
  	}
docs: Decode gzipped cdx to a temporary file