📄 main.java
字号:
import java.io.*;
class Main {
public static void main(String[] args) {
if (args.length == 0) {
System.err.println("java Main <inputfile> <outputfile>");
System.exit(-1);
}
try {
FileInputStream in = new FileInputStream(args[0]);
FileOutputStream out = new FileOutputStream(args[1]);
byte[] buf = new byte[512];
int count;
while ((count = in.read(buf)) > 0) {
out.write(buf, 0, count);
}
in.close();
out.flush(); // Flush data
out.getFD().sync(); // Commit changes to disk
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -