private void writeOut(byte[] data, int offset, int length) throws IOException {
    myBuffer.write(data, offset, length);
    if (myBuffer.size() > 8192) {
      flushBuffer();
    }
  }
private void writeOut(byte[] data, int offset, int length)