Skip to content

Commit

Permalink
for apache#732 checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
tuohai666 committed Apr 18, 2018
1 parent c687738 commit f69d14a
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,18 +342,42 @@ public void writeReserved(final int length) {
}
}

/**
* Read 4 byte float from byte buffers.
* @see <a href="https://dev.mysql.com/doc/internals/en/binary-protocol-value.html#ProtocolBinary::MYSQL_TYPE_FLOAT">MYSQL_TYPE_FLOAT</a>
*
* @return 4 byte float
*/
public float readFloat() {
return byteBuf.readFloatLE();
}

/**
* Write 4 byte float to byte buffers.
* @see <a href="https://dev.mysql.com/doc/internals/en/binary-protocol-value.html#ProtocolBinary::MYSQL_TYPE_FLOAT">MYSQL_TYPE_FLOAT</a>
*
* @param value 4 byte float
*/
public void writeFloat(final float value) {
byteBuf.writeFloatLE(value);
}

/**
* Read 8 byte double from byte buffers.
* @see <a href="https://dev.mysql.com/doc/internals/en/binary-protocol-value.html#ProtocolBinary::MYSQL_TYPE_DOUBLE">MYSQL_TYPE_DOUBLE</a>
*
* @return 8 byte double
*/
public double readDouble() {
return byteBuf.readDoubleLE();
}

/**
* Write 8 byte double to byte buffers.
* @see <a href="https://dev.mysql.com/doc/internals/en/binary-protocol-value.html#ProtocolBinary::MYSQL_TYPE_DOUBLE">MYSQL_TYPE_DOUBLE</a>
*
* @param value 8 byte double
*/
public void writeDouble(final double value) {
byteBuf.writeDoubleLE(value);
}
Expand Down

0 comments on commit f69d14a

Please sign in to comment.