Here you can find the source of encodeURI(String encoded)
public static String encodeURI(String encoded)
//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*/ }