第7章 IO输入输出.pptVIP

  • 5
  • 0
  • 约7.37千字
  • 约 46页
  • 2017-11-17 发布于河南
  • 举报
第7章 IO输入输出

第七章 IO输入输出 7.1 File类 File类是IO包中唯一代表磁盘文件本身的对象,如:文件创建的日期,文件的读写权限等等。而不是文件的内容。 File(File?parent, String?child) 根据 parent 抽象路径名和 child 路径名字符串创建一个新 File 实例。 File(String?pathname) ??通过将给定路径名字符串转换成抽象路径名来创建一个新 File 实例。 7.1 File类 ?boolean canRead() ???????? ?boolean createNewFile() Boolean delete() ? void deleteOnExit() ?????? Boolean exists() ?????????? String getAbsolutePath() ?????????? String getName() String getParent() ? File getParentFile() ? ?String getPath() ? 7.2 RandomAccessFile类 RandomAccessFile类是Java中的文件访问类,它提供了很多文件访问方法。 提供了随机访问的方式,可以跳转到文件的任何位置读些数据。 7.2 RandomAccessFile类 RandomAcc

文档评论(0)

1亿VIP精品文档

相关文档