日期:2014-05-16 浏览次数:20380 次
... try { out = new GZIPOutputStream(response.getOutputStream()); in = new ByteArrayInputStream(json.getBytes()); byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } } finally { if (in != null) in.close(); if (out != null) { out.finish(); out.close(); } } ...
in = new ByteArrayInputStream(json.getBytes(serializationParams.getEncoding()));