You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2008/05/22 15:00:22 UTC
svn commit: r659098 -
/mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java
Author: trustin
Date: Thu May 22 06:00:21 2008
New Revision: 659098
URL: http://svn.apache.org/viewvc?rev=659098&view=rev
Log:
Added ByteBufferQueue.merge() and ByteBufferQueue.peekSlice(int)
Modified:
mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java
Modified: mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java
URL: http://svn.apache.org/viewvc/mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java?rev=659098&r1=659097&r2=659098&view=diff
==============================================================================
--- mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java (original)
+++ mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java Thu May 22 06:00:21 2008
@@ -128,6 +128,15 @@
ByteBufferQueue removeSlice(int length);
/**
+ * Retrieves, but does not remove, the specified number of bytes from this
+ * queue, or returns <tt>null</tt> if the length of this queue is less
+ * than the specified length.
+ *
+ * @param length the number of bytes to retrieve
+ */
+ ByteBufferQueue peekSlice(int length);
+
+ /**
* Retrieves and removes one byte from the head of this queue.
*
* @throws NoSuchElementException if this queue is empty
@@ -333,4 +342,12 @@
* list of the {@link ByteBuffer}s, not {@link ByteBuffer}s themselves.
*/
ByteBufferQueue duplicate();
+
+ /**
+ * Merges all elements of this queue into one {@link ByteBuffer}. This
+ * operation doesn't change the state of this queue.
+ *
+ * @return the merged buffer
+ */
+ ByteBuffer merge();
}