public static final String toString(String str){
  if (str == null)   return "null";
  ByteArrayOutputStream buffer=new ByteArrayOutputStream();
  toByteArray(buffer,str);
  return buffer.toString();
}

public static final String toString ( String str ) { if ( str == null ) return "null" ; ByteArrayOutputStream buffer = new ByteArrayOutputStream ( ) ; toByteArray ( buffer , str ) ; return buffer . toString ( ) ; }
provides a java string literal representing the parameter string . this includes surrounding double quotes , and quoted special characters , including utf escape sequences when necessary . < p > this function works only for ascii character encoding , and assumes this is the default encoding .
