添加 够快 更新服务器

This commit is contained in:
seven332 committed 2014-04-08 22:03:39 +08:00
1 parent 74e37ea72d
commit 0c45ddf04d
13 files changed
+65 -32

No files matched your search

@@ -93,7 +93,13 @@ public class HttpHelper {
String encoding = conn.getContentEncoding();
if (encoding != null && encoding.equals("gzip"))
is = new GZIPInputStream(is);
baos = new ByteArrayOutputStream();
int length = conn.getContentLength();
if (length >= 0)
baos = new ByteArrayOutputStream(length);
else
baos = new ByteArrayOutputStream();
Util.copy(is, baos, Constant.BUFFER_SIZE);
// Get charset