1

Is it possible to open file in append mode in blackberry? In Connector class there are constants READ, WRITE, READ_WRITE but I didn't find any constant for append mode.

1 Answer 1

2

It is possible, though it isn't a separate mode:

FileConnection fc = (FileConnection) Connector.open(pathToFile, Connector.READ_WRITE);
OutputStream out = fc.openOutputStream(fc.fileSize());
// Now you can write to the output stream and it will append to the end of the file
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.