RFR: 4670339: (ch) Channels.newChannel(OutputStream) should flush stream on every write
Alan Bateman
alanb at openjdk.org
Tue Mar 28 07:12:28 UTC 2023
On Mon, 27 Mar 2023 23:35:58 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Call `flush()` on the `OutputStream` before returning from `WritableByteChannelImpl::write`.
This changes long standing behavior and may impact performance when the output stream is buffered. Is there a compelling reason to change the behavior? If so then maybe other options could be explored, `newChannel(OutputStream, boolean autoFlush)` or just documenting that automatic flushing can be done by wrapping the output stream.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13198#issuecomment-1486330070
More information about the nio-dev
mailing list