Back to project page volley.
The source code is released under:
Apache License
If you think the Android project volley listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android.volley.toolbox.multipart; /*from ww w.ja v a 2 s . com*/ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import org.apache.http.protocol.HTTP; public class UrlEncodingHelper { public static String encode(final String content, final String encoding) { try { return URLEncoder.encode( content, encoding != null ? encoding : HTTP.DEFAULT_CONTENT_CHARSET ); } catch (UnsupportedEncodingException problem) { throw new IllegalArgumentException(problem); } } }