摘要:publicHttpServletResponsedownload(Stringpath,HttpServletResponseresponse){try{//path是指欲下载的文件的路径。Filefile=newFile(path);//取得文件名。Stringfilename=file.getName();//取得文件的后缀名。Stringext=filename.substring(filename.lastIndexOf(".")+1).toUpperCase();//以流的形式下载文件。InputStreamfis=newBufferedInputStream(
阅读全文
posted @ 2011-06-14 10:50
浙公网安备 33010602011771号