Android URL Encode getURLEncodeStr(String url)

Here you can find the source of getURLEncodeStr(String url)

Description

get URL Encode Str

Declaration

public static String getURLEncodeStr(String url) 

Method Source Code

//package com.java2s;

import java.io.UnsupportedEncodingException;

import java.net.URLEncoder;

public class Main {
    public static String getURLEncodeStr(String url) {
        try {//from w  w w.ja v a  2 s .c o  m
            url = URLEncoder.encode(url, "utf-8");
        } catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
        }
        return url;
    }
}

Related

  1. encode(String base)
  2. encode(String url)
  3. urlEncode(String url)
  4. encodeURL(String value)
  5. urlEncode(String string)
  6. getUrlCode(String pageUrl)
  7. urlEncode(String in)
  8. encode(String s)
  9. encodeParams(ArrayList params)