Package org.apache.http.nio.util
Class DirectByteBufferAllocator
java.lang.Object
org.apache.http.nio.util.DirectByteBufferAllocator
- All Implemented Interfaces:
ByteBufferAllocator
@Contract(threading=IMMUTABLE)
public class DirectByteBufferAllocator
extends Object
implements ByteBufferAllocator
Allocates
ByteBuffer
instances using
ByteBuffer.allocateDirect(int)
.- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DirectByteBufferAllocator
public DirectByteBufferAllocator()
-
-
Method Details
-
allocate
Description copied from interface:ByteBufferAllocator
AllocatesByteBuffer
of the given size.- Specified by:
allocate
in interfaceByteBufferAllocator
- Parameters:
size
- the size of the buffer.- Returns:
- byte buffer.
-