Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public final class URLEncoder

  1. Object
  2. URLEncoder
The application/x-www-form-urlencoded form of a string. Letters, digits and .-*_ stay, a space is a plus, and every other character is the bytes of its encoding as %XX.

Methods

public static String encode(String s)Encodes in UTF-8, where the JDK uses the platform’s default.
public static String encode(String s, String enc) throws UnsupportedEncodingException
public static String encode(String s, Charset charset)

Inherited methods

Method details

encode

public static String encode(String s)
Encodes in UTF-8, where the JDK uses the platform’s default.

encode

public static String encode(String s, String enc) throws UnsupportedEncodingException

encode

public static String encode(String s, Charset charset)