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
Posts: 1,540
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido
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?

 

Developer
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.

Developer
Posts: 1,540
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: how to append data to SD card file?

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