private void flushBuffer() throws IOException {
    raf.seek(writtenOnDisk);
    raf.write(myBuffer.getInternalBuffer(), 0, myBuffer.size());
    writtenOnDisk += myBuffer.size();
    myBuffer.reset();
  }
private void flushBuffer()