public static String decodeUrl(String s) { try { return URLDecoder.decode(s, "utf-8"); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static String encodeUrl(String s) { try { return URLEncoder.encode(s, "utf-8"); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static String decodeUrl(String s) { try { return URLDecoder.decode(s, "utf-8"); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static String encodeUrl(String s) { try { return URLEncoder.encode(s, "utf-8"); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static String encodeUrl(String s, Charset enc) { try { return URLEncoder.encode(s, enc.name()); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public byte[] getBytes(String charsetName) { if (null == charsetName) { return s.getBytes(); } try { return s.getBytes(charsetName); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public byte[] getBytes(String charsetName) { if (null == charsetName) { return s.getBytes(); } try { return s.getBytes(charsetName); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static String encodeUrl(String s, Charset enc) { try { return URLEncoder.encode(s, enc.name()); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static String decodeUrl(String s, Charset enc) { try { return URLDecoder.decode(s, enc.name()); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static String decodeUrl(String s, Charset enc) { try { return URLDecoder.decode(s, enc.name()); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public byte[] getBytes(String charsetName) { String s = toString(); if (null == charsetName) { return s.getBytes(); } try { return s.getBytes(charsetName); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public byte[] getBytes(String charsetName) { String s = toString(); if (null == charsetName) { return s.getBytes(); } try { return s.getBytes(charsetName); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } }
public static List<String> readLines(InputStream is, String encoding, int limit) { if (encoding == null) { return readLines(is, limit); } else { InputStreamReader r; try { r = new InputStreamReader(is, encoding); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } return readLines(r, limit); } }
public static List<String> readLines(InputStream is, String encoding, int limit) { if (encoding == null) { return readLines(is, limit); } else { InputStreamReader r; try { r = new InputStreamReader(is, encoding); } catch (UnsupportedEncodingException e) { throw E.encodingException(e); } return readLines(r, limit); } }
throw E.encodingException(ex); } catch (Exception ex) { throw E.unexpected(ex);
throw E.encodingException(ex); } catch (Exception ex) { throw E.unexpected(ex);