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:02:46 UTC

svn commit: r659099 - /mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java

Author: trustin
Date: Thu May 22 06:02:45 2008
New Revision: 659099

URL: http://svn.apache.org/viewvc?rev=659099&view=rev
Log:
* Added elementAsSlice(int)
* Fixed an incorrect JavaDoc link (Thanks Rich!)

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=659099&r1=659098&r2=659099&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:02:45 2008
@@ -117,7 +117,7 @@
 
     /**
      * Retrieves and removes the specified number of bytes from this queue.
-     * This method differs from {@link #removeSlice(int)} only in that it
+     * This method differs from {@link #pollSlice(int)} only in that it
      * throws a {@link NoSuchElementException} when the length of this queue
      * is less than the specified length.
      *
@@ -137,6 +137,18 @@
     ByteBufferQueue peekSlice(int length);
 
     /**
+     * Retrieves, but does not remove, the specified number of bytes from this
+     * queue. This method differs from {@link #peekSlice(int)} only in that it
+     * throws a {@link NoSuchElementException} when the length of this queue
+     * is less than the specified length.
+     *
+     * @param length the number of bytes to retrieve
+     * @throws NoSuchElementException if the length of this queue is less
+     *                                than the specified length
+     */
+    ByteBufferQueue elementAsSlice(int length);
+
+    /**
      * Retrieves and removes one byte from the head of this queue.
      *
      * @throws NoSuchElementException if this queue is empty