📄 load.java
字号:
package org.better.hr.comm;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.struts.upload.FormFile;
public class Load {
public static String upload(FormFile file,String filepath)
{
FileOutputStream fileOutput;
try {
fileOutput = new FileOutputStream(filepath+file.getFileName());
fileOutput.write(file.getFileData());
fileOutput.flush();
fileOutput.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return file.getFileName();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -