package it.cavallium.strangedb.database; import java.io.IOException; import java.nio.ByteBuffer; public interface IBlocksIO { /** * Allocate a block * @param size block size * @param data block data * @return the block id */ long newBlock(int size, ByteBuffer data) throws IOException; /** * Read a block * @param blockId block id * @return block data */ ByteBuffer readBlock(long blockId) throws IOException; /** * Close file */ void close(); }