133134135136137138139140141142143
if ( file.exists() ) { OutputStream os = file.getOutputStreem(); transferStreams(req.getInputStream(), os, false); if ( !isWorkingCopy ) { // flush the working copy file.flushWorkingCopy(); } } else { resp.sendError(HttpServletResponse.SC_NOT_FOUND); }
7778798081828384858687
while ((bytesIn = zis.read(buffer)) != -1) { os.write(buffer, 0, bytesIn); } os.flush(); os.close(); uploaded.flushWorkingCopy(); } fileNames.add(zipFileName); } } else { //FIXME: common with above code
949596979899100101102103104
break; } os.write(buffer, 0, bytesRead); } fileNames.add(fileName); uploaded.flushWorkingCopy(); } } finally { is.close(); if (os != null) { os.flush();
3132333435363738394041
} else { try { if (!r.exists()) { r.createNewInstance(); VResourceUtils.copyFile(list[i], r); r.flushWorkingCopy(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }