void writeBuffer(List<int> buffer, int count) { if (write(buffer, count) != count) { throw EDatabaseError("Stream write error"); } }