Hi Mike,
Thanks for the advice - that got it. I called flush() after the call to
println(<string>) and sure enough it gets written to the file.
It's odd, since I don't have to do this when the println is called outside
of the scope of the timer/action. Any idea as to why?
Thanks again, cheers,
Paul
>> Hi,
>>
[quoted text clipped - 9 lines]
> You probably need to call flush() to see the changes appear in the file
> promptly.
Oliver Wong - 18 May 2007 16:07 GMT
> Hi Mike,
>
[quoted text clipped - 6 lines]
> Thanks again, cheers,
> Paul
Perhaps the writer is being implicitly flushed when it closes due to
getting garbage collected when the program ends?
Hard to say unless you post your code.
- Oliver
Mike Schilling - 18 May 2007 17:37 GMT
> Hi Mike,
>
[quoted text clipped - 3 lines]
> It's odd, since I don't have to do this when the println is called outside
> of the scope of the timer/action. Any idea as to why?
The buffer will flush when:
1. It fills up, or
2. The stream is explicitly flushed or closed, or
3. The program exits