private final void printCharacters(final char c, final int num) throws IOException {
   if (num == 1) {
     printCharacter(c);
   } else {
     char[] chars = new char[num];
     Arrays.fill(chars, c);
     printCharacters(chars);
   }
 }
  /** Issue an audible keyboard bell, if {@link #getBellEnabled} return true. */
  public final void beep() throws IOException {
    if (!(getBellEnabled())) {
      return;
    }

    printCharacter(KEYBOARD_BELL);
    // need to flush so the console actually beeps
    flushConsole();
  }
  /** Output the specified character, both to the buffer and the output stream. */
  private final void putChar(final int c, final boolean print) throws IOException {
    buf.write((char) c);

    if (print) {
      // no masking...
      if (mask == null) {
        printCharacter(c);
      }
      // null mask: don't print anything...
      else if (mask.charValue() == 0) {;
      }
      // otherwise print the mask...
      else {
        printCharacter(mask.charValue());
      }

      drawBuffer();
    }
  }
 /** Clear the line and redraw it. */
 public final void redrawLine() throws IOException {
   printCharacter(RESET_LINE);
   flushConsole();
   drawLine();
 }