Hi Aaron,

I have been facing some strange problem with File streams. When I update (I mean write 
some characters to the middle of the file
stream), it appears to me that the rest of the contents, that originally were in the 
filestream, are lost.

I had to write the file contents into a temporary file and then write them back to the 
file.

Do you have any idea or is this the way it is suppose to work?

I will be very thank full to your help.

Thank you,

Chida

Aaron Ardiri wrote:

> > The format is undocumented, but it basically consists of a database
> > with the file stream attribute set in its header, and a series of
> > 4K blocks as database records, the blocks acting as file sectors.
>
>   thats exactly right.. each "record" starts with the 4 characters
>   "DBLK" :) i wrote a Java utility a while back to convert a raw file
>   on the desktop into a file stream on the palm :)
>
>   /me has to dig it up.. it's somewhere :) - although, not hard to do
>
>   basically.. it took the desktop file, broke it up into 4096 byte
>   chunks (all but last were 4096 bytes).. it slapped on "DBLK" in
>   the front of each chunk.. and then.. i used a program like
>   "files2pdb" to put all the chunks together into a single .pdb file :)
>
>   but beware.. Palm didn't document it for a reason (maybe).. the
>   format will probably change with new devices.. i can see it changing
>   probably with a different endian CPU.. :)
>
>   have fun :) welcome to hacker-ville :P
>
> // az
> [EMAIL PROTECTED]
> http://www.ardiri.com/    <--- free games!
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to