Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UrlyBird - question about the data file format

 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

It was mentionned in my assignement:

"All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes. All text values and all fields (which are text only) contain only 8 bit characters, null terminated if less than the maximum length for the field. The character encoding is 8 bit US ASCII"

-When I read 02 bytes (the record flag for example), I use readShort() method of the RandomAccessFile class. am I wrong?

-If the field value does not attend its maximum, I fill with blanc characters. Does "null terminated" mean : filling with blank characters?

Best Regards
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) could be. Experiment
2) no, but many people find that the description of the file as records being null terminated is incorrect and spaces are used instead
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike

I choose to use space,also, for consistence reasons.

Regards M.
 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic