public static String encode(String s){
  return encode(s,null);
}

public static String encode ( String s ) { return encode ( s , null ) ; }
encodes characters in the given string as ' % ' - escaped octets using the utf - 8 scheme . leaves letters ( " a - z " , " a - z " ) , numbers ( " 0 - 9 " ) , and unreserved characters ( " _ - ! . ~ ' ( ) * " ) intact . encodes all other characters .
