This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: buffer flushing?
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 28 May 2002 15:58:04 +1200
- Subject: Re: buffer flushing?
- References: <86znyllyrg.fsf@megacz.com>
Adam Megacz wrote:
>java.io.OutputStream.flush() does nothing
>
>java.io.FileOutputStream.flush() is not defined
>
>Win32 buffers all non-console file descriptors. I need to ensure that
>FileDescriptor.sync() is called when FileOutputStream.flush() is
>called.
>
>What is the best way to deal with this? Should I submit a patch to add
>this?
>
> FileOutputStream.flush() { fd.sync(); }
>
>
I don't think we should add this method since it looks like the spec
doesn't have it implemented for FileOutputStream, which implys that it
does nothing.
What does the JDK do? Perhaps you want to create the FileOutputStream
using the FileDescriptor constructor and call sync() on it yourself?
regards
Bryce.