public static void main(String[] args) {
String uri = "https://download.tim.qq.com/msg_history/4/bb2a91f4097a0747ab4a11ec8724b8cef6d20907.gz";
StringBuffer sb = null;
try
{
URL url = new URL(uri);
URLConnection conn = url.openConnection();
final InputStream inputStream = conn.getInputStream();
final GZIPInputStream gzip = new GZIPInputStream(inputStream);
final InputStreamReader reader = new InputStreamReader(gzip);
final BufferedReader bufferedReader = new BufferedReader(reader);
sb = new StringBuffer();
String content=null;
while ((content = bufferedReader.readLine()) != null) {
sb.append(content);
}
} catch (IOException e) {
e.printStackTrace();
}
System.out.println(sb.toString());
}