📄 fileoutputstream1.java
字号:
import java.io.*;
public class FileOutputStream1 {
public static void main(String[] args) {
FileInputStream fin = null;
FileOutputStream fout = null;
try {
fin = new FileInputStream("d:\\a.txt");
}catch(FileNotFoundException e) {
System.out.println("the file is not found!!");
}
try {
fout = new FileOutputStream("d:\\share\\jproject\\io\\b.txt");
int b = 0;
while((b=fin.read()) != -1) {
fout.write(b);
}
fin.close();
fout.close();
}catch(FileNotFoundException e) {
System.out.println("the file is not found too!!");
}catch(IOException e) {
System.out.println("the Io Exception !!");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -