Here you can find the source of encode(String s)
public static String encode(String s)
//package com.java2s; //License from project: LGPL import java.net.URLEncoder; public class Main { public static String encode(String s) { return URLEncoder.encode(s); }/*from w w w . j a va2 s .co m*/ }