Package com.biglybt.pifimpl.local.utils
Class PooledByteBufferImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.utils.PooledByteBufferImpl
-
- All Implemented Interfaces:
PooledByteBuffer
public class PooledByteBufferImpl extends java.lang.Object implements PooledByteBuffer
-
-
Field Summary
Fields Modifier and Type Field Description private DirectByteBuffer
buffer
-
Constructor Summary
Constructors Constructor Description PooledByteBufferImpl(byte[] data)
PooledByteBufferImpl(byte[] data, int offset, int length)
PooledByteBufferImpl(int size)
PooledByteBufferImpl(DirectByteBuffer _buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectByteBuffer
getBuffer()
void
returnToPool()
byte[]
toByteArray()
java.nio.ByteBuffer
toByteBuffer()
java.util.Map
toMap()
Data must be b-encoded...
-
-
-
Field Detail
-
buffer
private DirectByteBuffer buffer
-
-
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 interfacePooledByteBuffer
-
toByteBuffer
public java.nio.ByteBuffer toByteBuffer()
- Specified by:
toByteBuffer
in interfacePooledByteBuffer
-
toMap
public java.util.Map toMap() throws java.io.IOException
Description copied from interface:PooledByteBuffer
Data must be b-encoded...- Specified by:
toMap
in interfacePooledByteBuffer
- Returns:
- Throws:
java.io.IOException
-
getBuffer
public DirectByteBuffer getBuffer()
-
returnToPool
public void returnToPool()
- Specified by:
returnToPool
in interfacePooledByteBuffer
-
-