Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh


Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is Sun going to make better APIs like this by scrapping old Apis ?
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, at least not any time soon. The name "New I/O" is rather unfortunate. NIO is not a replacement for the old I/O classes. Rather, it's an alternate way of performing I/O.
The older classes in are very powerful and flexible. The compositional patterns they enable work for a broad range of applications.
Unfortunately, the stream metaphor used throughout does not meet every need. The notion of non-blocking is not there at all. And several non-stream-like I/O operations such as memory mapping and file-locking were never considered.
NIO is a response to the need for performance (by allowing data to be transferred in larger blocks under better control of the programmer) and to provide access to additional I/O services which industrial strength applications need to use.
Don't stop using the "old" I/O APIs if they meet your needs, they're not being deprecated in the foreseeable future. But if some feature of NIO can be put to use, use it. NIO is here to stay.
Joel Salatin has signs on his property that say "Trespassers will be Impressed!" Impressive tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic