日期:2014-05-17 浏览次数:20682 次
ServletOutputStream op = response.getOutputStream(); JszyDao jd=new JszyDao(); int fid=0; try { fid=Integer.parseInt(request.getParameter("fid")); }catch(Exception ex){ out.print("数据不存在."); return; } BufferedInputStream is=jd.getJszyIo(fid); try{ int len=0; byte[] buf=new byte[10*1024]; while((len= is.read(buf))!=-1) { op.write(buf, 0, len); } is.close(); op.flush(); op.close(); }catch(Exception ex){ ex.printStackTrace(); }