You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by mw...@apache.org on 2007/07/13 15:42:20 UTC
svn commit: r555995 -
/mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java
Author: mwebb
Date: Fri Jul 13 06:42:19 2007
New Revision: 555995
URL: http://svn.apache.org/viewvc?view=rev&rev=555995
Log:
updated javadoc based on conversations on the mailing list
Modified:
mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java
Modified: mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java?view=diff&rev=555995&r1=555994&r2=555995
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java Fri Jul 13 06:42:19 2007
@@ -140,15 +140,14 @@
private static boolean preferDirectBuffers = false;
/**
- * Returns the current allocator which manages the allocated buffers.
+ * Returns the allocator used by existing and new buffers
*/
public static ByteBufferAllocator getAllocator() {
return allocator;
}
/**
- * Changes the current allocator with the specified one to manage
- * the allocated buffers from now.
+ * Sets the allocator used by existing and new buffers
*/
public static void setAllocator(ByteBufferAllocator newAllocator) {
if (newAllocator == null) {
@@ -236,6 +235,10 @@
return wrap(java.nio.ByteBuffer.wrap(byteArray, offset, length));
}
+ /**
+ * Creates a new instance of ByteBuffer. This is an empty constructor.
+ *
+ */
protected ByteBuffer() {
}
@@ -994,7 +997,11 @@
}
/**
- * Returns hexdump of this buffer.
+ * Returns hexdump of this buffer. The data and pointer are
+ * not changed as a result of this method call.
+ *
+ * @return
+ * hexidecimal representation of this ByteBuffer
*/
public String getHexDump() {
return this.getHexDump(Integer.MAX_VALUE);
@@ -1005,6 +1012,8 @@
*
* @param lengthLimit The maximum number of bytes to dump from
* the current buffer position.
+ * @return
+ * hexidecimal representation of this ByteBuffer
*/
public String getHexDump(int lengthLimit) {
return ByteBufferHexDumper.getHexdump(this, lengthLimit);