Better javadocs
This commit is contained in:
parent
1162d0c3f9
commit
77492816e2
|
@ -212,10 +212,11 @@ class OptimizeUtilsByteArray {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of bytes that would be written with {@link #writeLong(byte[], long, boolean)}.
|
* Returns 1-9 bytes that would be written with {@link #writeLong(byte[], long, 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 (9
|
||||||
|
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
|
||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
int longLength(long value, boolean optimizePositive) {
|
int longLength(long value, boolean optimizePositive) {
|
||||||
|
@ -229,7 +230,8 @@ class OptimizeUtilsByteArray {
|
||||||
* Reads a 1-9 byte long.
|
* Reads a 1-9 byte long.
|
||||||
*
|
*
|
||||||
* @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 (9
|
||||||
|
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
|
||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
long readLong(byte[] buffer, boolean optimizePositive) {
|
long readLong(byte[] buffer, boolean optimizePositive) {
|
||||||
|
@ -244,7 +246,8 @@ class OptimizeUtilsByteArray {
|
||||||
*
|
*
|
||||||
* @param position where in the buffer to start reading
|
* @param position where in the buffer to start reading
|
||||||
* @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 (9
|
||||||
|
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
|
||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
long readLong(final byte[] buffer, final boolean optimizePositive, int position) {
|
long readLong(final byte[] buffer, final boolean optimizePositive, int position) {
|
||||||
|
@ -468,8 +471,6 @@ class OptimizeUtilsByteArray {
|
||||||
return position != limit;
|
return position != limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
OptimizeUtilsByteArray() {
|
OptimizeUtilsByteArray() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,10 +178,11 @@ class OptimizeUtilsByteBuf {
|
||||||
// long
|
// long
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of bytes that would be written with {@link #writeLong(ByteBuf, long, boolean)}.
|
* Returns the 1-9 bytes that would be written with {@link #writeLong(ByteBuf, long, 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 (9
|
||||||
|
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
|
||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
int longLength(long value, boolean optimizePositive) {
|
int longLength(long value, boolean optimizePositive) {
|
||||||
|
@ -221,7 +222,8 @@ class OptimizeUtilsByteBuf {
|
||||||
* Reads a 1-9 byte long.
|
* Reads a 1-9 byte long.
|
||||||
*
|
*
|
||||||
* @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 (9
|
||||||
|
* bytes). This ultimately means that it will use fewer bytes for positive numbers.
|
||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
long readLong(ByteBuf buffer, boolean optimizePositive) {
|
long readLong(ByteBuf buffer, boolean optimizePositive) {
|
||||||
|
@ -272,7 +274,7 @@ class OptimizeUtilsByteBuf {
|
||||||
*
|
*
|
||||||
* @param optimizePositive
|
* @param optimizePositive
|
||||||
* If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (9
|
* If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (9
|
||||||
* bytes).
|
* 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