文件上传前改名
通过new   File(filename)得到一个File对象后 
 我想在上传之前把文件名改掉,不知怎么改 
 File类里有个方法是renameTo(File   dest),但是这个方法只能把原文件改了   
------解决方案--------------------晕,你也不说清楚是http上传还是ftp上传》。。
------解决方案--------------------想改啥名字, 
 File from = new File( "C:\\text.txt "); 
 File to = new File( "C:\\temp.txt "); 
 boolean success = from.renameTo(to); 
 ............
------解决方案--------------------顶