HttpClient请求后的处理代码
HttpEntity entity = response.getEntity();
if (entity != null) {
resp.reset();
resp.setContentType("application/octet-stream;");
InputStream is = entity.getContent();
OutputStream out = resp.getOutputStream();
byte[] bytes = new byte[1024];
int len;
while ((len = is.read(bytes)) != -1) {
out.write(bytes, 0, len);
out.flush();
}
is.close();
out.close();
}