Originally posted by shan chen:
The instruction says:
"All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream." It seems to me that it's better to use DataInputStream/DataOutputStream for io. But I did not find any method in DataOutputStream to location a position, which is important for update a record. RandomeAccessFile will be needed instead.
Any suggestion?
Thanks.
Originally posted by Michael Dreese:
If DataInputStream/DataOutputStream did implement the reset method, I would not have to use RandomAccessFile.
Originally posted by damu liu:
hi, shan chen
could you tell me what is header?
thx!
Originally posted by Venkateswara Rao Gunturu:
Hi Guys,
It seems some of you are working new project. How are you implementing primary key concept, like int recordNumber, where that field is not described in the db.db
And are you providing functionality for adding and deleting records in the UI where in the project add/delete/update records was not mentioned.
GVRao
Originally posted by Venkateswara Rao Gunturu:
Hi Ta Ri Ki Sun,
In the db format/schema/data section, they never mentioned about record number. But they mentioned record number only in the DB interface file.
What assumption made you to implement record number in the db.db?
It is clearly mentioned, we should not touch anything in the db.db file.
Can you please help me?
GVRao
Originally posted by damu liu
hi, shan chen
could you tell me what is header?
thx!
Originally posted by
Try something like this
FileInputStream fis = new FileInputStream(databaseFileName);
BufferedInputStream bis = new BufferedInputStream(fis);
DataInputStream dis = new DataInputStream(bis);
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |