private void writeNext(String string) {
    try {
      myPrintStream.write(string.getBytes());
    } catch (IOException e) {
      throw new RuntimeException(e.getMessage());
    }
  }
private void writeNext(String string)