Get your CodeRanch badge!*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 19


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: 865
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java NIO Tutorial, Java NIO vs. IO, Buffer Basics., direct buffer vs Indirect buffer
 
Similar Threads
io vs nio debate continues
Java NIO vs. traditional IO.
Readers vs OutputStreams
NIO vs IO
Writing data into file from a String variable