文件下载
String fileName = "222.jpg";
response.setHeader("content-disposition", "attachment;filename="+fileName);
FileInputStream in = new FileInputStream("C:\\Users\\Administrator\\Desktop/123.jpg");
int len = 0;
byte[] bytes = new byte[1024];
ServletOutputStream out = response.getOutputStream();
while ((len = in.read(bytes)) != -1){
out.write(bytes,0,len);
}
in.close();
out.close();