Sunday, 16 June 2019

NIO2 Introduction


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

Previous                                                 Next                                                 Home

No comments:

Post a Comment