public static String urlEncode(String param) {
        if (param != null) {
            try {
                return URLEncoder.encode(param, "utf-8");
            } catch (UnsupportedEncodingException e) {
            }
        }
        return "";
    }