/** * Translates a string into <code>x-www-form-urlencoded</code> * format. This method uses the platform'sdefault encoding * as the encoding scheme to obtain thebytes for unsafe characters. * * @param s <code>String</code> to betranslated. * @deprecated The resulting string mayvary depending on the platform's * default encoding. Instead, use theencode(String,String) * method to specify the encoding. * @return the translated <code>String</code>. */ @Deprecated public static String encode(String s) { String str = null; try { str = encode(s, dfltEncName); } catch(UnsupportedEncodingException e) { // The system should always have theplatform default } return str; }