Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Questions on the Data File

 
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
 
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 ]
 
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
 
Goodbye moon men. Hello tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic