Android URL Encode encodeURI(String encoded)

Here you can find the source of encodeURI(String encoded)

Description

encode URI

Declaration

public static String encodeURI(String encoded) 

Method Source Code

//package com.java2s;

public class Main {
    public static String encodeURI(String encoded) {
        encoded = encoded.replace("(", "%28");
        encoded = encoded.replace(")", "%29");
        encoded = encoded.replace("!", "%21");
        encoded = encoded.replace("\'", "%27");
        encoded = encoded.replace("*", "%2A");
        return encoded;
    }/*from  ww w.  j ava  2  s  .c  o m*/
}

Related

  1. encode(String value)
  2. encode(String base)
  3. encode(String url)
  4. urlEncode(String url)
  5. encodeURL(String value)