上传操作方法:[java] viewplaincopy1. public int doUpload() throws Exception { 2. 3. Map
2、> param = new HashMap(); 4. ServletFileUpload servletFileUpload = new ServletFileUpload(); 5. FileItemIterator itr = servletFileUpload.getItemIterator(mSGA.getCurrentRequest()); 6. while (itr.hasNext()) { 7. FileItemS
3、tream fi = itr.next(); 8. if ("file".equals(fi.getFieldName())) { 9. InputStream is = fi.openStream(); 10. byte[] b = FileCopyUtils.copyToByteArray(is); //FileCopyUtils 为spring下的一个工具类。 11. if (b == null