• Post Reply Bookmark Topic Watch Topic
  • New Topic

Questions on the Data File  RSS feed

 
Ravikiran Vishnuvajhala
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following questions on the Data File provided and the instructions given:

1. The instructions say:
"All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes".

I am assuming here it is just for our information and not really meant to read the data using the DataInputStream Class. I am planning to use RandomFileAccess class to read the file. Please let me know if my understanding is not correct

2. Magic Cookie Value:
Is it ok to store the Magic cookie value in some properties file and use it to validate the value stored in the data file to match file. Or is there any other suggested way to validate this value? Or do you think we don't need to worry about it?

Thank you for your help.

Thanks
Ravi
 
Tim Anlauf
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YOu got it...
 
Ravikiran Vishnuvajhala
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Tim for your confirmation.
[ March 13, 2007: Message edited by: Ravikiran Vishnuvajhala ]
 
Brian Kelly
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Yep, you can use RandomFileAccess.
2. I ignored the magic cookie... think it's okay to ignore it as long as you explain why in your choices.txt
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!