📄 testfileinputstream.java
字号:
// 1 according fis.read(),we could get the int type data!
// 2 if we use the read(),and the file pointer move to next position!
// wangbo 2004 4 23
import java.io.*;
public class TestFileInputStream
{
public static void main(String[] args) throws Exception
{
FileInputStream fis = new FileInputStream("Test.txt");
LineNumberInputStream lnis = new LineNumberInputStream(fis);
lnis.setLineNumber(3);
System.out.println(lnis.getLineNumber());
byte[] bs = new byte[64];
fis.read(bs);
for(int i=0;i<bs.length;i++)
{
System.out.print((char)bs[i]);
}
System.out.println();
fis.close();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -