encode URL to string - Android java.net

Android examples for java.net:URL

Description

encode URL to string

Demo Code

import android.net.Uri;

public class Main{

    public static String encode(String base) {
        String encoded = Uri.encode(base);
        return encodeURI(encoded);
    }//ww  w.  j a v  a  2s .co  m

}

Related Tutorials