The Power of Java 7 NIO.2
来源:互联网 发布:马勒交响曲知乎 编辑:程序博客网 时间:2024/04/29 21:58
version1 NIO before the JDK 7
version 2 NIO delivered in Java SE 7
Working with the new Path Class
The file system can be accessed through the java.nio.file.FileSystems final calss which is used to get an instance of the java.nio.file.FileSystems we need
FileSystems contains the following two important methods as well as a set of newFileSystem() methods, for constructing new file systems:
getDefault()
This is a static method that returns a fule system from the set of available file system to the JVM
getFileSystem(URI uri)
This is a static method that returns file system from the set of available file system provides taht match the gevien URI schema
The Path calss supports two types of operations:
Syntactic operations
Logical mapulations done in memory
&Operations over files
metadata File attributes
if you have questions abount a file or a directory, such whether is is hidden;
NIO.2 groups the attributes into views, each of which maps to a particular file system implementation
java.nio.file.attribute
Symbolic and Hard links
java.nio.file.Files-->createSystembolicLink(), isSymbolicLink(), and readSymbolicLink()
hardLink should be within the same system.
Files and Directories
NIO.2 comes with a set of brand new methods to accomplish these tasks. most of which are found in the java.nio.file.Files calss
The FileVistor interface
for(FileVisitResult constant: FileVisitResult.values())
system.out.println(constant)
class search implement fileVistor
Monitoring VIA Watch Service API
New powerful Random Access Files
- The Power of Java 7 NIO.2
- The power of Reading
- The power of algorithm
- The Power of Imagination
- power of the test
- power of power: the real one
- The Power of Clarity (ZT)
- The Power of Prototype.js
- The Power of Work Stress
- POWER OF THE MASTER MIND
- HDU4461:The Power of Xiangqi
- the power of magic cubie
- hdu4461 The Power of Xiangqi
- The power of TextView(Drawables)
- The Power of Inline Views
- HDU4461 The Power of Xiangqi
- (java)Power of Two
- The Power Of The Bug Bash
- 应用金数据在线订单功能 为中小企业带来真正价值
- 110507 The Stern-Brocot Number System
- 看到了百度理财的技术,才知道小米的技术才是最牛的
- 2013年工作中遇到的20个问题:261-280
- linux串口的操作
- The Power of Java 7 NIO.2
- 我的c++程序(2)
- java 链接jdbc时设置链接数据库编码
- NiosII: Pausing target processor: not responding
- JSON小例子:对象和json串之间转换
- Linux工具大全_flex
- Vim 开发Rails
- centos6.4 svn server安装及配置
- 无线传感网络笔迹