directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r417130 - in /directory/trunks/mina/core/src/main/java/org/apache/mina/common: ByteBuffer.java ByteBufferProxy.java PooledByteBufferAllocator.java SimpleByteBufferAllocator.java
Date Mon, 26 Jun 2006 06:35:02 GMT
Author: trustin
Date: Sun Jun 25 23:35:02 2006
New Revision: 417130

URL: http://svn.apache.org/viewvc?rev=417130&view=rev
Log:
Resolved issue: DIRMINA-220 ByteBuffer.array() and ByteBuffer.arrayOffset()
* Added array() and arrayOffset() to ByteBuffer and its implementations

Modified:
    directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBuffer.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBufferProxy.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/common/PooledByteBufferAllocator.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/common/SimpleByteBufferAllocator.java

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBuffer.java?rev=417130&r1=417129&r2=417130&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBuffer.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBuffer.java Sun Jun
25 23:35:02 2006
@@ -436,6 +436,16 @@
     public abstract ByteBuffer asReadOnlyBuffer();
 
     /**
+     * @see java.nio.ByteBuffer#array()
+     */
+    public abstract byte[] array();
+    
+    /**
+     * @see java.nio.ByteBuffer#arrayOffset()
+     */
+    public abstract int arrayOffset();
+    
+    /**
      * @see java.nio.ByteBuffer#get()
      */
     public abstract byte get();

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBufferProxy.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBufferProxy.java?rev=417130&r1=417129&r2=417130&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBufferProxy.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/common/ByteBufferProxy.java Sun
Jun 25 23:35:02 2006
@@ -622,4 +622,14 @@
     {
         return buf.asReadOnlyBuffer();
     }
+
+    public byte[] array()
+    {
+        return buf.array();
+    }
+
+    public int arrayOffset()
+    {
+        return buf.arrayOffset();
+    }
 }

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/common/PooledByteBufferAllocator.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/common/PooledByteBufferAllocator.java?rev=417130&r1=417129&r2=417130&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/common/PooledByteBufferAllocator.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/common/PooledByteBufferAllocator.java
Sun Jun 25 23:35:02 2006
@@ -498,6 +498,16 @@
                 new UnexpandableByteBuffer( buf.buf().asReadOnlyBuffer(), buf ), false );
             return newBuf;
         }
+        
+        public byte[] array()
+        {
+            return buf.buf().array();
+        }
+        
+        public int arrayOffset()
+        {
+            return buf.buf().arrayOffset();
+        }
 
         public byte get()
         {

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/common/SimpleByteBufferAllocator.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/common/SimpleByteBufferAllocator.java?rev=417130&r1=417129&r2=417130&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/common/SimpleByteBufferAllocator.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/common/SimpleByteBufferAllocator.java
Sun Jun 25 23:35:02 2006
@@ -523,5 +523,15 @@
         public ByteBuffer asReadOnlyBuffer() {
             return new SimpleByteBuffer( this.buf.asReadOnlyBuffer() );
         }
+
+        public byte[] array()
+        {
+            return buf.array();
+        }
+        
+        public int arrayOffset()
+        {
+            return buf.arrayOffset();
+        }
     }
 }



Mime
View raw message