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 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()
           
 ByteBuffer toByteBuffer()
           
 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 ByteBuffer toByteBuffer()
Specified by:
toByteBuffer in interface PooledByteBuffer

toMap

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

Specified by:
toMap in interface PooledByteBuffer
Returns:
Throws:
IOException

getBuffer

public DirectByteBuffer getBuffer()

returnToPool

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