📄 teststream.java
字号:
import java.io.*;
class TestStream
{
public static void main(String[]args) throws Exception
{
/*
int data;
while((data=System.in.read())!=-1)
{
System.out.write(data);
}
*/
FileOutputStream fos = new FileOutputStream("1.txt");
//fos.write("真好呀".getBytes());
//fos.close();
/*
FileInputStream fins = new FileInputStream("1.txt");
byte[] buf = new byte[100];
int len = fins.read(buf);
System.out.println(new String(buf, 0, len));
fins.close();
*/
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.write("sdfjklsdfjkl".getBytes());
bos.close();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -