• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Java NIO

 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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

Thanks!
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 22862
132
Eclipse IDE Spring TypeScript Quarkus Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Top Ten New Things You Can Do with NIO
reply
    Bookmark Topic Watch Topic
  • New Topic