public static String escape(String s){
  if (s == null) {
    return null;
  }
  StringBuffer sb=new StringBuffer();
  escape(s,sb);
  return sb.toString();
}

public static String escape ( String s ) { if ( s == null ) { return null ; } StringBuffer sb = new StringBuffer ( ) ; escape ( s , sb ) ; return sb . toString ( ) ; }
escape quotes , \ , / , \ r , \ n , \ b , \ f , \ t and other control characters ( u + 0000 through u + 001f ) .
