예제 #1
0
  /** {@inheritDoc} */
  public void sync(int offset, int length) {
    try {
      final int y = offset / getWidth();
      final int x = offset % getWidth();
      terminalIO.setCursor(y, x);

      final TelnetIO telnetIO = terminalIO.getTelnetIO();

      int offs = offset;
      for (int i = 0; i < length; i++) {
        telnetIO.write(buffer[offs++]);
      }
      if (terminalIO.isAutoflushing()) {
        terminalIO.flush();
      }
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }