aspose file tools*
The moose likes Beginning Java and the fly likes Java NIO Tutorial, Java NIO vs. IO, Buffer Basics., direct buffer vs Indirect buffer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java NIO Tutorial, Java NIO vs. IO, Buffer Basics., direct buffer vs Indirect buffer" Watch "Java NIO Tutorial, Java NIO vs. IO, Buffer Basics., direct buffer vs Indirect buffer" New topic
Author

Java NIO Tutorial, Java NIO vs. IO, Buffer Basics., direct buffer vs Indirect buffer

Anish Nath
Greenhorn

Joined: Sep 21, 2011
Posts: 23


In Java programming, I/O has until recently been carried out using a stream metaphor. All I/O is viewed as the movement of single bytes, one at a time, through an object called a Stream. Stream I/O is used for contacting the outside world. It is also used internally, for turning objects into bytes and then back into objects.
NIO has the same role and purpose as original I/O, but it uses a different metaphor -- block I/O. As you will learn in this tutorial, block I/O can be a lot more efficient than stream I/O.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
> In Java programming, I/O has until recently been carried out using a stream metaphor.

You posted this today.

However NIO has been around since version J2SE 1.4 (February 6, 2002)
NIO was extended with Java SE 7 (July 28, 2011).

Java version history
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java NIO Tutorial, Java NIO vs. IO, Buffer Basics., direct buffer vs Indirect buffer