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