• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

UrlyBird - question about the data file format

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Guys
reply
    Bookmark Topic Watch Topic
  • New Topic