Interface BufferSource
-
- All Known Implementing Classes:
HeapBufferSource,OffHeapBufferSource,TimingBufferSource
public interface BufferSourceA source of NIO buffers of some type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.nio.ByteBufferallocateBuffer(int size)Allocates a buffer of the given size.
-
-
-
Method Detail
-
allocateBuffer
java.nio.ByteBuffer allocateBuffer(int size)
Allocates a buffer of the given size.If a suitable buffer cannot be allocated then
nullshould be returned. Implementations may place restrictions on the valid size value they will accept.- Parameters:
size- required buffer size- Returns:
- a buffer of the required size
-
-