Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Anish Nath
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 972
5
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> 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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic