wood burning stoves 2.0
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes IO Streams to use 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 "IO Streams to use" Watch "IO Streams to use" New topic

IO Streams to use

Clivant Yeo
Ranch Hand

Joined: May 22, 2004
Posts: 124
Hi ranchers,

Regarding the use of IO Streams, which stream should I use? Is DataInputStream and DataOutputStream a compulsory?


Clivant Yeo
My Personal Website
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11777

Hi Clivant,

DataInputStream and DataOutputStream are not compulsory - you can use any classes you like. Since you will be updating individual records in the file, you may want to look at RandomAccessFile which can be used for both reading and writing.

You should check your instructions for any mention of NIO. Some of the latest instructions specify that NIO may not be used. But if you don't have any such instruction, then you may use NIO if you like.

Regards, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Clivant Yeo
Ranch Hand

Joined: May 22, 2004
Posts: 124
Thanks Andrew, I note your point.
I agree. Here's the link: http://aspose.com/file-tools
subject: IO Streams to use
It's not a secret anymore!