Updated documentation

This commit is contained in:
nathan 2016-03-06 21:30:59 +01:00
parent 987ab83349
commit ef02ca2087
2 changed files with 16 additions and 3 deletions

View File

@ -96,6 +96,10 @@ class OptimizeUtilsByteArray {
* FROM KRYO
* <p>
* Reads an int from the buffer that was optimized.
*
* @param optimizePositive
* If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (5
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
*/
@SuppressWarnings("UnusedAssignment")
public static
@ -128,7 +132,8 @@ class OptimizeUtilsByteArray {
* Writes the specified int to the buffer using 1 to 5 bytes, depending on the size of the number.
*
* @param optimizePositive
* true if you want to optimize the number of bytes needed to write the length value
* If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (5
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
*
* @return the number of bytes written.
*/

View File

@ -47,7 +47,8 @@ class OptimizeUtilsByteBuf {
* Returns the number of bytes that would be written with {@link #writeInt(ByteBuf, int, boolean)}.
*
* @param optimizePositive
* true if you want to optimize the number of bytes needed to write the length value
* If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (5
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
*/
public static
int intLength(int value, boolean optimizePositive) {
@ -97,6 +98,12 @@ class OptimizeUtilsByteBuf {
* FROM KRYO
* <p>
* Reads an int from the buffer that was optimized.
*
* @param optimizePositive
* If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (5
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
*
* @return the number of bytes written.
*/
public static
int readInt(ByteBuf buffer, boolean optimizePositive) {
@ -127,7 +134,8 @@ class OptimizeUtilsByteBuf {
* Writes the specified int to the buffer using 1 to 5 bytes, depending on the size of the number.
*
* @param optimizePositive
* true if you want to optimize the number of bytes needed to write the length value
* If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (5
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
*
* @return the number of bytes written.
*/