• FileReader 字符输入流
@Test
public void test1(){
File file = new File("hello.txt");
FileReader fr = null;
try {
fr = new FileReader(file);
//返回读取的内容
int data;
while ((data = fr.read()) != -1){
System.out.print((char)data);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}finally {
if (fr != null){
try {
fr.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

  

最新文章

  1. [IOS基础]关于IOS的UIScreeen,UIView,UIViewController,UIWindow理解
  2. scoi2010&&bzoj1858序列操作
  3. pacman -Syu : key could not be looked up remotely.
  4. dede文章调用时过滤调 body里面的style属性和值
  5. java连接mysql :No Suitable Driver Found For Jdbc 解决方法
  6. mac安装nginx
  7. IOS webView快照
  8. Python核心编程读笔 1
  9. 鸟哥的LINUX私房菜基础篇第三版 阅读笔记 四 档案的文件系统的压缩和打包
  10. springmvc基础篇—掌握三种处理器
  11. bzoj 1098 poi2007 办公楼 bfs+链表
  12. RequestMethod.Post&RequestMethod.GET
  13. scala中的isInstanceOf和asInstanceOf
  14. kubebapps 添加私有harbor 中的helm repo
  15. dubbo管控台安装
  16. bzoj1215
  17. Security Permissions Caching
  18. ORA-12505: TNS: 监听程序当前无法识别连接描述符中所给出的SID等错误解决方法
  19. POJ 2752 Seek the Name, Seek the Fame(KMP求公共前后缀)
  20. HDU - 4675 GCD of Sequence (莫比乌斯反演+组合数学)

热门文章

  1. RSA算法的基本原理
  2. HTML值改变事件
  3. webstorm中使用git管理服务器上的代码——入门级
  4. 服务器迁移部署OmsEdi
  5. 短URL系统、301/302重定向
  6. 6.Spring【AOP】XML方式
  7. React学习整理
  8. mysql5.7基于gtid进行搭建主从复制过程
  9. [编织消息框架][netty源码分析]3 EventLoop 实现类SingleThreadEventLoop职责与实现
  10. [转]iMPACT Spartan-6 FPGA - "WARNING:iMPACT:2217-Error shows in the status register, CRC Error bit is Not 0"