The specifications of the write methods of the classes GatheringByteChannel and WritableByteChannel in the java.nio.channels package are not sufficiently emphatic for some users with respect to the number of bytes written, this despite the statement
"Some types of channels, depending upon their state, may write only some of the bytes or possibly none at all."
being present in the specification of each. Further elucidation could be added to the effect that it is necessary to call the write method in a loop until all bytes are written.
"Some types of channels, depending upon their state, may write only some of the bytes or possibly none at all."
being present in the specification of each. Further elucidation could be added to the effect that it is necessary to call the write method in a loop until all bytes are written.
- csr for
-
JDK-8370040 (ch) Refine specification of behavior of {Gathering,Writable}ByteChannel.write
-
- Closed
-
- relates to
-
JDK-8368991 Data corruption sending over SocketChannel using virtual threads
-
- Closed
-
- links to
-
Commit(master)
openjdk/jdk/a1be2979
-
Review(master)
openjdk/jdk/27833