There might be lots of reasons. if you send your code, it's easier to say. But you could check: 1. you have closed your Stream when writing to the file (It is recommended that you do it in a finally block) like this:
try{
....
write the data to the file with some outputStream
}finally{
outputStream.close();
}
2. If you want to read the data before closing the stream, make sure your output-stream does not buffer the output. if it doues, before reading the data, flush the output to the file:
outputStream.flush();
3. Check for any exception that might be caught, but not logged, some code like this:
try{
...
}catch(IOException ex){
// here must log the exception.
}
}
Majid
2010-10-13 13:32:13