RFR: 8155902: DataOutputStream writeInt creates 2 packets instead of 1
Roger Riggs
rriggs at openjdk.org
Fri Jul 7 14:23:54 UTC 2023
On Thu, 6 Jul 2023 21:40:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Add a disclaimer to `java.io.DataOutputStream` to the effect that it makes no guarantee as to how the underlying output stream actually writes the bytes provided to it.
src/java.base/share/classes/java/io/DataOutputStream.java line 44:
> 42: * the underlying output stream, hence there is no guarantee as to
> 43: * the details of how the bytes are written.
> 44: *
I'd drop "merely".
I would not want to give any assurances about whether the bytes of an encoded primitive were written individually or as a group.
For the primitive types the value is encoded and written as one or more bytes to the underlying stream.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14791#discussion_r1255901199
More information about the core-libs-dev
mailing list