This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S recommendation regarding reading the file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S recommendation regarding reading the file" Watch "B&S recommendation regarding reading the file" New topic
Author

B&S recommendation regarding reading the file

Lek Olof
Greenhorn

Joined: Jan 03, 2007
Posts: 10
hi,

I just want to hear what your recommendation is regarding reading the file.

Are you reading everything, like the byte that says number of fields and fieldnames and all of that or are you hardcoding field names and number of fields in each record?

And what about that magic cookie value? are you just reading it and hardcoding like "if(magicCookieValue = 1234) then the file format is ok, else not ok?

regards
Olof
Song Jing Lim
Ranch Hand

Joined: Feb 11, 2003
Posts: 56
For me, I read everything and store to DataSchema javabean object which also store RandomFileAccess object.

I just read the magic cookie but never use it... May be can store the value to properties file then compare with the one read from data file.


Rgds,<br />Song Jing
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: B&S recommendation regarding reading the file
 
Similar Threads
Schema handling
XML details
Question regarding Field Lengths
Interface question B&S
Reading the schema