Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

URLyBird file format - db-1x2.db

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
thanks!
 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic