• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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: 9526
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: 21503
96
Chrome Eclipse IDE Java Spring Ubuntu VI Editor 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: 9526
12
Linux Mac OS X Windows
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!