Package org.capnproto
Interface Allocator
-
- All Known Implementing Classes:
DefaultAllocator
public interface AllocatorAn object that allocates memory for a Cap'n Proto message as it is being built.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBufferallocateSegment(int minimumSize)Allocates a ByteBuffer to be used as a segment in a message.
-
-
-
Method Detail
-
allocateSegment
ByteBuffer allocateSegment(int minimumSize)
Allocates a ByteBuffer to be used as a segment in a message. The returned buffer must contain at least `minimumSize` bytes, all of which MUST be set to zero.
-
-