List of utility methods to do String Encode
String | encodeState(Map encode State String state = null; try { StringBuilder stateBuilder = new StringBuilder(); for (Map.Entry<String, String> e : params.entrySet()) { stateBuilder.append(URLEncoder.encode(e.getKey(), "utf-8")).append('&'); stateBuilder.append(URLEncoder.encode(e.getValue(), "utf-8")).append('&'); if (stateBuilder.length() > 0) { ... |
String | encodeStr(String str) encode Str try { str = URLEncoder.encode(str, ENCODE_CHARACTERSET); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return str; |
String | encodeStr(String str) encode Str try { return new String(str.getBytes("ISO-8859-1"), "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; |
String | encodeStr(String t) Translates a string into x-www-form-urlencoded format return URLEncoder.encode(t);
|
String | encodeString(final String string) Encodes a string into Base64 format. String encodedString = null; try { encodedString = encodeString(string, "UTF-8"); } catch (UnsupportedEncodingException uue) { return encodedString; |
void | encodeString(OutputStream out, String str) encode String encodeBytes(out, str.getBytes("ASCII"));
|
String | encodeString(String b) encode String return new String(encode(b.getBytes())); |
byte[] | encodeString(String in) Encode a string into the current character set. byte[] rv = null; try { rv = in.getBytes(charset); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); return rv; |
String | encodeString(String myString) encode String if (myString == null) { throw new NullPointerException("encodeString: myString == null!"); try { return java.net.URLEncoder.encode(myString, "UTF-8"); } catch (UnsupportedEncodingException ex) { throw new AssertionError("UTF-8 not supported"); |
String | encodeString(String s) Encodes string to be URL safe. try { return URLEncoder.encode(s, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("string encoding failed", e); |