How to read and write data into same file simultaneously
I have read many a posts where-in they speak about reading and writing into the file NOT simultaneously using JavaME. I have a special use case scenarios where-in my log file (maybe full file or just portion of the file) is uploaded to the server on regular basis. This must continue without hampering the current logging of the application in this same file. The code sample is a under: boolean writing = true; boolean reading = true; void main() { new Thread("THREAD-FILE-READ") { public void run() { InputStream instream = getFileInStream(); if (null != instream) { while (reading) { try { try {