/** * Escape and encode a string regarded as the path component of an URI with * the default protocol charset. * @param unescaped an unescaped string * @return the escaped string */ public static String encodePath(String unescaped) { byte[] rawdata = URLCodec.encodeUrl(allowed_abs_path, getBytes(unescaped, "UTF-8")); return getAsciiString(rawdata); }
/** * Escape and encode a string regarded as the path component of an URI with * the default protocol charset. * @param unescaped an unescaped string * @return the escaped string */ public static String encodePath(String unescaped) { byte[] rawdata = URLCodec.encodeUrl(allowed_abs_path, getBytes(unescaped, "UTF-8")); return getAsciiString(rawdata); }