Java-IO与文件读写-使用Apache-commons-io包提高读写效率.pdfVIP

  • 268
  • 0
  • 约1.76万字
  • 约 9页
  • 2017-06-06 发布于河南
  • 举报

Java-IO与文件读写-使用Apache-commons-io包提高读写效率.pdf

Java-IO与文件读写-使用Apache-commons-io包提高读写效率

【Java基础专题】IO与文件读写使用Apache commons io包提高读写效率 【⼀】Apache commons IO简介 首先贴⼀段Apac he commons IO官网上的介绍,来 这个著名的开源包有⼀个基本的了解: Commons IO is a library of ut ilit ies to assist wit h developing IO funct ionality. T here are four main areas inc luded: ●Ut ility c lasses wit h stat ic met hods to perform common tasks ●Filters various implementat ions of file filters ●Comparators various implementat ions of java.ut il.Comparator for files ●St reams useful st ream, reader and writer implementat ions Packages This package defines utility classes for mons.io working with streams, readers, writers and files. This package provides various Comparator parator implementations for Files. This package defines an interface mons.io.filefilter (IOFileFilter) that combines both FileFilter and FilenameFilter. This package provides implementations mons.io.input of input classes, such as InputStream and Reader. mons.io.output This 【二】ons.io.input包介绍 这个包针 SUN JDK IO包进行了扩展,实现了⼀些功能简单的IO类,主要包括了 字节/字符输入流接口的实现 这个包针 java.io.InputSt ream和Reader进行了扩展,其中比较实用的有以下几个: ●AutoCloseInputStream Proxy stream that closes and discards the underlying stream as soon as the end of input has been reached or when the stream is explicitly closed. Not even a reference to the underlying stream is kept after it has been closed, so any allocated in-memory buffers can be freed even if the client application still keeps a reference to the proxy stream This class is typically used to release any resourc

文档评论(0)

1亿VIP精品文档

相关文档