Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java NIO  RSS feed

 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Is Java NIO a popular mechanism nowadays?
Any other mechanism better than this one?

Thanks!
 
Bartender
Posts: 9493
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sarah Marsh wrote:
Is Java NIO a popular mechanism nowadays?



I'm not sure how one would determine if it were popular or not. Is it used directly more than the standard java.io classes? Probably not. But the standard java.io classes use it under the covers so if one is using standard java.io, one is also using java.nio, so that would make it very popular.

sarah Marsh wrote:
Any other mechanism better than this one?



How would you define "better"? If you need the functionality that NIO provides (non-blocking sockets, for instance), I don't think there are many alternatives.
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Joe.

Is NIO necessary? IO in the newest JDK can handle what NIO need to be used. Am I correct?
 
Sheriff
Posts: 21330
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "old" IO package cannot handle non-blocking reads - you'll need the "new" IO (that's where nio came from) package for that.
 
Joe Ess
Bartender
Posts: 9493
12
Linux Mac OS X Windows
 
What's brown and sticky? ... a stick. Or a tiny ad.
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!