What is the exact use of java nio package when already methods are available with io package

Abhishek Choudhary picture Abhishek Choudhary · Apr 29, 2012 · Viewed 34.7k times · Source

I was learning java nio package and I realized there are lots of methods already provided by File which nio.Files is providing again by using Path class. Like that few more I got. I am actually not getting what is the actual use of nio package.

I am just very new to this package so may be my question is wrong but a little help can boost me to read further.

Answer

Deco picture Deco · Apr 29, 2012

The main difference between IO and NIO is that IO is blocking, while NIO is non-blocking.

This article explains the differences in the packages and what blocking and non-blocking IO is. archived