package lirixing.b;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
public class Inp {
public static void main(String[] args) throws IOException {
test2();
}
/**
* 文件输入流的创建方式以及字节缓冲流
*/
private static void test2() throws IOException {
FileInputStream fis=new FileInputStream("d:/hello.txt"); // 2
BufferedInputStream bis=new BufferedInputStream(fis);
int b=0;
StringBuilder sb=new StringBuilder();
while ((b=bis.read())!=-1) {
sb.append((char)b);
}
System.out.println(sb.toString());
bis.close();
}
}