File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Use of NIO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Use of NIO" Watch "Use of NIO" New topic
Author

Use of NIO

Vrinda Werdel
Ranch Hand

Joined: Jan 03, 2004
Posts: 75
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

Joined: Dec 18, 2003
Posts: 319
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.


Jacques<br />*******<br />MCP, SCJP, SCJD, SCWCD
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
I would certainly consider the FileChannel class.
All best,
M


Java Regular Expressions
Colin Richardson
Greenhorn

Joined: Jan 23, 2004
Posts: 13
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

Joined: Apr 15, 2003
Posts: 619
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 ]

Regards, George
SCJP, SCJD, SCWCD, SCBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use of NIO