public void write(int c){
  if (text != null) {
    text.append(String.valueOf((char)c));
    if (++col > wrap)     println();
  }
 else   super.write(c);
}

public void write ( int c ) { if ( text != null ) { text . append ( String . valueOf ( ( char ) c ) ) ; if ( ++ col > wrap ) println ( ) ; } else super . write ( c ) ; }
write a single character .
