(1)http://www.cnblogs.com/xdp-gacl/p/3789624.html
(2)VenusWebHelper 等等
public void test(){ String file = "D:\frankman.txt"; String fileNames = "hello.txt"; try { //VenusWebHelper.pushFileToClient(sResponse, file, fileNames); String data = "中国"; OutputStream outputStream = sResponse.getOutputStream();//获取OutputStream输出流 sResponse.setHeader("content-type", "text/html;charset=UTF-8");//通过设置响应头控制浏览器以UTF-8的编码显示数据,如果不加这句话,那么浏览器显示的将是乱码 byte[] dataByteArr = data.getBytes("UTF-8");//将字符转换成字节数组,指定以UTF-8编码进行转换 outputStream.write(dataByteArr);//使用OutputStream流向客户端输出字节数组 } catch (Exception e) { System.out.println(e.getMessage()+"-----------------------------"+e.toString()); e.printStackTrace(); } }