but I find it is not convenient to use those classes, I rather use RandomAccessFile class.

regards

SCJP1.4 SCJD 2<br />SCEA(In progressing)

Serkan Yazici

Ranch Hand

Posts: 33

posted 12 years ago

Hi Along,

I think what the instructions want to make clear is don't worry about the endian format for the numbers (In other words, readShort/readInt/writeShort/etc specified in DataOutput and DataInput interfaces and implemented in DataInputStream and DataOutputStream classes will work fine).

It is said that I can use RandomAccessFile to access the db file,but I'm not sure whether doing so deviate Sun's intention,as the instruction expressly say to use DataInputStream.

regards

SCJP1.4 SCJD 2<br />SCEA(In progressing)

Mike Keller

Greenhorn

Posts: 9

posted 12 years ago

They aren't telling you to implement DataInputStream, they are just describing the format of the numbers. DataInputStream and RandomAccessFile both get their functionality reading numbers from the DataInput interface. Don't sweat it.