public class URLCoder extends Object
| Constructor and Description |
|---|
URLCoder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(String input)
URL-decode the input with UTF-8.
|
static String |
encode(String input)
URL-encode the input with UTF-8.
|
static String |
formUrlEncode(Map<String,?> parameters)
Convert the given map to a string in
x-www-form-urlencoded format. |
public static String encode(String input)
input - A string to be encoded.public static String decode(String input)
input - An encoded string.public static String formUrlEncode(Map<String,?> parameters)
x-www-form-urlencoded format.parameters - Pairs of key and values. The type of values must be either
String[] or List<String>.x-www-form-urlencoded format.
null is returned if parameters is null.Copyright © 2019. All rights reserved.