RFR: 4670339: (ch) Channels.newChannel(OutputStream) should flush stream on every write [v2]
Andrey Turbanov
aturbanov at openjdk.org
Wed Mar 29 07:43:31 UTC 2023
On Tue, 28 Mar 2023 17:06:39 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Call `flush()` on the `OutputStream` before returning from `WritableByteChannelImpl::write`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 4670339: Make WritableByteChannelImpl Flushable; add newChannel(OutputStream,boolean)
test/jdk/java/nio/channels/Channels/Basic.java line 306:
> 304: ByteArrayOutputStream baos = new ByteArrayOutputStream(size);
> 305: try (BufferedOutputStream bos = new BufferedOutputStream(baos, size);
> 306: WritableByteChannel wbc = Channels.newChannel(bos, true);) {
Suggestion:
WritableByteChannel wbc = Channels.newChannel(bos, true)) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13198#discussion_r1151516729
More information about the nio-dev
mailing list