@Override public void print(String str){
  if (str == null) {
    str="null";
  }
  try {
    write(str.getBytes(charset));
  }
 catch (  java.io.IOException e) {
    setError();
  }
}

@ Override public void print ( String str ) { if ( str == null ) { str = "null" ; } try { write ( str . getBytes ( charset ) ) ; } catch ( java . io . IOException e ) { setError ( ) ; } }
override the print ( string ) method from printstream to perform the character conversion using the console character converter .
