文件操作
文章平均质量分 67
iteye_6230
这个作者很懒,什么都没留下…
展开
-
利用jspsmart上传文件
1.upFile.jsp在页面提交form代码参照一下内容 function SaveItem(type){ var str = document.all.ON_SEQ.value; var dd=str.indexOf(".") var type = document.all.ON_SEQ.value.substring(dd+1, str.l...2009-08-19 15:16:04 · 98 阅读 · 0 评论 -
下载文件
1.页面链接 window.location = "downloadExcel.jsp?id=" + fileId; 2.downFile.jsp内容,直接从数据库读取文件流下载2009-08-19 15:22:56 · 103 阅读 · 0 评论 -
解压/压缩zip包
压缩/解压采用org.apache.tools.zip包,相对其他压缩/解压包,这个支持中文比较好 1.解压zip文件 //解压文件 public synchronized void unzip(String zipFileName, String extPlace, boolean whether) th...2009-08-19 15:41:02 · 255 阅读 · 0 评论 -
poi读取xlsx和xls
使用poi读取,jxl对于excel2007不支持 1. 读取xlsx 数据 InputStream fs XSSFWorkbook workbook = new XSSFWorkbook(fs); XSSFSheet st = workbook.getSheetAt(0); for (int rowNumOfSheet = 1; rowNumOfShee...原创 2012-04-12 11:38:28 · 232 阅读 · 0 评论 -
文件上传下载InputStream与string,bytes互转
1. 上传文件InputStream转string或bytes private byte [] inputStreamToByte(InputStream is) throws IOException { ByteArrayOutputStream bAOutputStream = new ByteArrayOutputStream(); i...原创 2012-08-15 21:24:18 · 328 阅读 · 0 评论