private void writeChar ( final char chr ) throws IOException { switch ( chr ) { case ' ' : this . Tab ( ) ; break ; case ' ' : { 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 ' ' : break ; default : { if ( ! Character . isISOControl ( chr ) ) { this . out . write ( chr ) ; this . linePosition ++ ; if ( this . mode == MODE_START_LINE ) { this . mode = this . prevMode ; } } } break ; } }
Main method writing a char into wrapped writer .