Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of NIO

 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I was just thinking about the usage of NIO from the assignment perspective. To what extent would it help to use it in the place of previous IO apis.
One factor running against NIO is the fact that some of it is platform specific.
What is the ratioanale behind using NIO?
Any inputs will be greatly appreciated.
regards
Vrinda
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RandomAccessFile did just fine for me. But then again, I don't know nio very well. Did read up about it allot and decided it's not needed here.
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would certainly consider the FileChannel class.
All best,
M
 
Colin Richardson
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've only just started looking at SCJD certification (I'm just finishing my preparation for SCBCD). However, I have bought Max's book and seen that it deals with NIO. But I also looked at Sun's Certification web site for SCJD, which lists the following restrictions.
The following APIs and facilities may not be used:
Enterprise JavaBeans
Servlets, JSP technology, or any other web-oriented APIs
NIO, the New IO facilities
Java DataBase Connectivity (JDBC) and SQL
Java IDL API and CORBA
Third party software libraries or tools (such as browsers)
Is this now out of date? Do you get instructions that allow NIO when you download the assignment?
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Colin,
Originally posted by Colin Richardson:
But I also looked at Sun's Certification web site for SCJD, which lists the following restrictions.
The following APIs and facilities may not be used:
Enterprise JavaBeans
Servlets, JSP technology, or any other web-oriented APIs
NIO, the New IO facilities
Java DataBase Connectivity (JDBC) and SQL
Java IDL API and CORBA
Third party software libraries or tools (such as browsers)
Is this now out of date? Do you get instructions that allow NIO when you download the assignment?

Good catch. It's good that someone actually read the information posted at Sun (here's the link: http://suned.sun.com/US/catalog/courses/CX-310-252A.html). I guess now I'm not sorry I didn't use NIO.
The assignment instructions don't mention NIO one way or the other. I suspect many people aren't aware of this restriction (including the people grading the exam).
Thanks for pointing this out. I've started a new thread (Topic: NIO prohibited for SCJD project?) on this topic so that more people will see it.
-George
[ February 10, 2004: Message edited by: George Marinkovich ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic