public static String encode (final String s, final String encoding) throws UnsupportedEncodingException { if ("utf-8".equalsIgnoreCase(encoding)) { return encodeUTF8(s); } return encodeBytes(s.getBytes(encoding)); }
public static String encode (final String s, final String encoding) throws UnsupportedEncodingException { if ("utf-8".equalsIgnoreCase(encoding)) { return encodeUTF8(s); } return encodeBytes(s.getBytes(encoding)); }