Updated documentation
This commit is contained in:
parent
987ab83349
commit
ef02ca2087
@ -96,6 +96,10 @@ class OptimizeUtilsByteArray {
|
|||||||
* FROM KRYO
|
* FROM KRYO
|
||||||
* <p>
|
* <p>
|
||||||
* Reads an int from the buffer that was optimized.
|
* 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")
|
@SuppressWarnings("UnusedAssignment")
|
||||||
public static
|
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.
|
* Writes the specified int to the buffer using 1 to 5 bytes, depending on the size of the number.
|
||||||
*
|
*
|
||||||
* @param optimizePositive
|
* @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.
|
* @return the number of bytes written.
|
||||||
*/
|
*/
|
||||||
|
@ -47,7 +47,8 @@ class OptimizeUtilsByteBuf {
|
|||||||
* Returns the number of bytes that would be written with {@link #writeInt(ByteBuf, int, boolean)}.
|
* Returns the number of bytes that would be written with {@link #writeInt(ByteBuf, int, boolean)}.
|
||||||
*
|
*
|
||||||
* @param optimizePositive
|
* @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
|
public static
|
||||||
int intLength(int value, boolean optimizePositive) {
|
int intLength(int value, boolean optimizePositive) {
|
||||||
@ -97,6 +98,12 @@ class OptimizeUtilsByteBuf {
|
|||||||
* FROM KRYO
|
* FROM KRYO
|
||||||
* <p>
|
* <p>
|
||||||
* Reads an int from the buffer that was optimized.
|
* 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
|
public static
|
||||||
int readInt(ByteBuf buffer, boolean optimizePositive) {
|
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.
|
* Writes the specified int to the buffer using 1 to 5 bytes, depending on the size of the number.
|
||||||
*
|
*
|
||||||
* @param optimizePositive
|
* @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.
|
* @return the number of bytes written.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user