diff --git a/bson/src/main/org/bson/ByteBuf.java b/bson/src/main/org/bson/ByteBuf.java index 13dfa1f95a..cd14d2f93d 100644 --- a/bson/src/main/org/bson/ByteBuf.java +++ b/bson/src/main/org/bson/ByteBuf.java @@ -42,12 +42,12 @@ public interface ByteBuf { *
Writes the given byte into this buffer at the given index.
* * @param index The index at which the byte will be written - * @param b The byte value to be written + * @param value The byte value to be written * @return This buffer * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit * @throws java.nio.ReadOnlyBufferException If this buffer is read-only */ - ByteBuf put(int index, byte b); + ByteBuf put(int index, byte value); /** * Returns the number of elements between the current position and the limit. @@ -99,60 +99,61 @@ public interface ByteBuf { * *Writes the given byte into this buffer at the current position, and then increments the position.
* - * @param b The byte to be written + * @param value The byte to be written * @return This buffer * @throws java.nio.BufferOverflowException If this buffer's current position is not smaller than its limit * @throws java.nio.ReadOnlyBufferException If this buffer is read-only */ - ByteBuf put(byte b); + ByteBuf put(byte value); /** * Writes the given int value into this buffer at the current position, * using the current byte order, and increments the position by 4. * - * @param b the int value to be written + * @param value the int value to be written * @return this buffer * @throws java.nio.BufferOverflowException if there are fewer than 4 bytes remaining in this buffer * @throws java.nio.ReadOnlyBufferException if this buffer is read-only * @since 5.4 */ - ByteBuf putInt(int b); + ByteBuf putInt(int value); /** * Writes the given int value into this buffer at the current position, * using the current byte order, and increments the position by 4. * - * @param b the int value to be written + * @param value the int value to be written + * @param index the index at which the int will be written * @return this buffer * @throws java.nio.BufferOverflowException if there are fewer than 4 bytes remaining in this buffer * @throws java.nio.ReadOnlyBufferException if this buffer is read-only * @since 5.4 */ - ByteBuf putInt(int index, int b); + ByteBuf putInt(int index, int value); /** * Writes the given double value into this buffer at the current position, * using the current byte order, and increments the position by 8. * - * @param b the double value to be written + * @param value the double value to be written * @return this buffer * @throws java.nio.BufferOverflowException if there are fewer than 8 bytes remaining in this buffer * @throws java.nio.ReadOnlyBufferException if this buffer is read-only * @since 5.4 */ - ByteBuf putDouble(double b); + ByteBuf putDouble(double value); /** * Writes the given long value into this buffer at the current position, * using the current byte order, and increments the position by 8. * - * @param b the long value to be written + * @param value the long value to be written * @return this buffer * @throws java.nio.BufferOverflowException if there are fewer than 8 bytes remaining in this buffer * @throws java.nio.ReadOnlyBufferException if this buffer is read-only * @since 5.4 */ - ByteBuf putLong(long b); + ByteBuf putLong(long value); /** *Flips this buffer. The limit is set to the current position and then the position is set to zero. If the mark is defined then it @@ -198,6 +199,7 @@ public interface ByteBuf { * Returns the offset of the first byte within the backing byte array of * this buffer. * + * @return the offset within this buffer's array. * @throws java.nio.ReadOnlyBufferException If this buffer is backed by an array but is read-only * @throws UnsupportedOperationException if this buffer is not backed by an accessible array * @since 5.5