/** * Allocates a ByteBuffer to be used for writing to the specified block. The * contents of the ByteBuffer are undefined. * * @param objectPool the object pool to attempt to get objects from and * release objects to. * @param blockId The ID of the block that this buffer will be written to. * @return a ByteBuffer to be used for writing to the specified block. */ public Block allocateBlock(ObjectPool objectPool, long blockId) { return readBlock(objectPool, blockId); }