DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

API documentation for LittleEndianDataOutputStream.writeUTF and LittleEndianDataInputStream.readUTF is misleading #1659

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The documentations for those two methods are simply inherited from DataInput 
and DataOutput.  However, the inherited documentations say that "[the string's] 
length is written to the output stream in exactly the manner of the writeShort 
method" (for writeUTF) and "First, two bytes are read and used to construct an 
unsigned 16-bit integer in exactly the manner of the readUnsignedShort method" 
(for readUTF), which wrongly suggests that the length is encoded in 
little-endian format.  However, this is not what the implementations of those 
methods do.  The implementations are exactly compliant with 
java.io.DataOutputStream and java.io.DataInputStream, so the length is actually 
enoded in big-endian format.

Original issue reported on code.google.com by michel.n...@gmail.com on 6 Feb 2014 at 3:50

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:07