UTF8 url Encode - Android java.net

Android examples for java.net:URL

Description

UTF8 url Encode

Demo Code

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Iterator;
import java.util.UUID;

public class Main{

    public static String urlEncodeUtf8(String string)
            throws UnsupportedEncodingException {
        return URLEncoder.encode(string, "UTF-8");
    }//from   ww w .ja v a2  s  .c o  m

}

Related Tutorials