code: private void writeChar(final char chr) throws IOException {
      switch (chr) {
        case '\t':
          this.Tab();
          break;
        case '\n': {
          this.out.write(this.lineSeparator);
          this.lineNumber++;
          this.prevMode = this.mode;
          this.mode = MODE_START_LINE;
          this.linePosition = 0;
          for (final Extra e : extras) {
            e.onNewLine(this, this.lineNumber);
          }
        }
        break;
        case '\r':
          break;
        default: {
          if (!Character.isISOControl(chr)) {
            this.out.write(chr);
            this.linePosition++;
            if (this.mode == MODE_START_LINE) {
              this.mode = this.prevMode;
            }
          }
        }
        break;
      }
    }
docs: Main method writing a char into wrapped writer.
  
  @param chr a char to be written.
  @throws IOException it will be thrown for transport errors.