NIO2 is introduced in Java7 and these APIs are used to
access the file system directly.
The APIs provided by java standard IO library are used to
perform file operations like read content, write to content, traverse
directory, move file etc., then why NIO2? It is because, standard IO libraries
are not efficient in handling directories with tons of files. NIO2 solves the
performance problem by directly plugged into native file system.
There are 4 main classes in NIO2.
a.
FileSystemProvider
b.
FileStore
c.
FileSystem
d.
FileSystems
No comments:
Post a Comment