182_08_IO流_FileInputStream_02
2017-04-30 11:56
253 查看
package TestIO; import java.io.*; public class Test01 { public static void main(String[] args) throws Exception { ////内容是:abcdef String filepath= "D:\\test.txt"; FileInputStream fis=null; fis = new FileInputStream(filepath); //第一种循环 // while(true){ // int temp = fis.read(); // if(temp == -1) break; // System.out.println("temp--->"+temp); // } //第二种d int temp=0; while((temp =fis.read()) != -1){ System.out.println(temp); } fis.close(); } }
相关文章推荐
- 08-02 文件IO流 网络通信(TCP) 集合 泛型
- 181_08_IO流_FileInputStream_01
- 183_08_IO流_FileInputStream_03_读取到内存的byte数组
- 185_08_IO流_FileInputStream_05_byte数组转换成字符串
- 186_08_IO流_FileInputStream__06_available_skip方法
- 08-02 文件IO流 网络通信(TCP) 集合 泛型
- IO流-02
- AT24C01/02/04/08/16/32系列EEPROM驱动程序
- 黑马程序员_java基础学习笔记08_IO流
- Java File类,IO流,字节输入流InputStream,FileInputStream学习使用
- Java基础20天--02--IO流
- 21-IO流-08-IO流(字符流-练习-复制文本文件_1)
- IO流——文件操作流之字节输入流FileInputStream
- Java基础知识强化之IO流笔记24:FileInputStream / FileOutputStream 复制文本文件案例2
- (原创)c#学习笔记08--面向对象编程简介01--面向对象编程的含义02--一切皆对象
- Spark API编程动手实战-08-基于IDEA使用Spark API开发Spark程序-02
- 20170215C语言提升08_指针_02数组指针及指针数组及函数指针
- C语言学习笔记―08-02
- 黑马程序员--08.注解--02【注解的基本知识】【Java内建注解】
- 20 API-IO流(递归,IO流(字节流FileOutputStream,FileInputStream,字节缓冲区流BufferedOutputStream,BufferedInputStream