Can't get sockets to work

Per Bothner
Tue May 25 11:24:00 GMT 1999

Tom Tromey <> writes:
> The buffer is only flushed at certain points: when it is full,
> (sometimes) when a newline is printed, or when flush() is called.

The buffer must be flushed when the file is closed.
Do a x.flush() just before a x.close() should be harmless
but redundant.

If the stream is not getting flushed when it is closed, that is
a bug that must be fixed.
	--Per Bothner

More information about the Java mailing list