org.gudy.azureus2.pluginsimpl.local.utils
Class PooledByteBufferImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.utils.PooledByteBufferImpl
All Implemented Interfaces:
PooledByteBuffer

public class PooledByteBufferImpl
extends java.lang.Object
implements PooledByteBuffer


Constructor Summary
PooledByteBufferImpl(byte[] data)
           
PooledByteBufferImpl(byte[] data, int offset, int length)
           
PooledByteBufferImpl(DirectByteBuffer _buffer)
           
PooledByteBufferImpl(int size)
           
 
Method Summary
 DirectByteBuffer getBuffer()
           
 void returnToPool()
           
 byte[] toByteArray()
           
 java.nio.ByteBuffer toByteBuffer()
           
 java.util.Map toMap()
          Data must be b-encoded...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PooledByteBufferImpl

public PooledByteBufferImpl(DirectByteBuffer _buffer)

PooledByteBufferImpl

public PooledByteBufferImpl(int size)

PooledByteBufferImpl

public PooledByteBufferImpl(byte[] data)

PooledByteBufferImpl

public PooledByteBufferImpl(byte[] data,
                            int offset,
                            int length)
Method Detail

toByteArray

public byte[] toByteArray()
Specified by:
toByteArray in interface PooledByteBuffer

toByteBuffer

public java.nio.ByteBuffer toByteBuffer()
Specified by:
toByteBuffer in interface PooledByteBuffer

toMap

public java.util.Map toMap()
                    throws java.io.IOException
Description copied from interface: PooledByteBuffer
Data must be b-encoded...

Specified by:
toMap in interface PooledByteBuffer
Returns:
Throws:
java.io.IOException

getBuffer

public DirectByteBuffer getBuffer()

returnToPool

public void returnToPool()
Specified by:
returnToPool in interface PooledByteBuffer