• 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 file format - db-1x2.db

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried viewing the file format in OpenOffice with a different encoding, and I see that if a field in the file doesnt occupy full length, the rest of the empty space has been filled with " "(space).

Now when I do an update or create in the file and use StringBuilder's replace() and then perform the file write operation, the unfilled bytes gets represented as '#'(hash) in the file instead of a space. Do I need to code in such a way so as to preserve the spaces in the file also?(like maybe concatenating unused field length with space). Does Sun view the file separately?
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Partner, I added extra spaces to the field value, so the field position is filled with a value + extra spaces. For instance, if a field value can have 64 characters, and the new value has 30 characters, then the value that will be persisted is 30 characters + 34 blank spaces.
 
Sundeep Nanua
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic