Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
smiley
Posts: 1,468
Registered: ‎07-14-2008
My Device: Z10
Accepted Solution

how to append data to SD card file?

i'm using OutputStream to write data to a file on the sd card.

Before i started coding i assumed one can use a seek() similar api but i couldnt find a way to move the file position.

 

is it possible to append data using OutputStream or another method?

 

Please use plain text.
Developer
richard_puckett
Posts: 191
Registered: ‎04-03-2008
My Device: Bold 9700

Re: how to append data to SD card file?

FileConnection.openOutputStream(long byteOffset)

 

byteOffset - number of bytes to skip over from the beginning of the file when positioning the start of the OutputStream. If the provided offset is larger than or equal to the current file size, the OutputStream is positioned at the current end of the file for appending.

Please use plain text.
Developer
smiley
Posts: 1,468
Registered: ‎07-14-2008
My Device: Z10

Re: how to append data to SD card file?

Thanks Richard.  I was looking at the OutputStream and not FileConnection.

 

Please use plain text.