/**
* 上傳文件
* @param file
* @param path
* @param fileName
* @throws IOException
*/
public void fileLoad(File file, String path, String fileName)
throws IOException {
//上傳文件路徑+文件名
File target = new File(path+fileName);
//讀取上傳的文件
BufferedReader br = new BufferedReader(new FileReader(file));
//輸出上傳的文件
BufferedWriter bw = new BufferedWriter(new FileWriter(target));
//設置流量
char[] buf = new char[1024];
//開始上傳
while(br.read(buf) != -1){
bw.write(buf);
}
bw.close();
br.close();
}get