public final class URLEncoder extends Object implements Cloneable
| Modifier and Type | Field and Description |
|---|---|
static URLEncoder |
DEFAULT |
static URLEncoder |
QUERY |
| Constructor and Description |
|---|
URLEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSafeCharacter(char c) |
Object |
clone() |
String |
encode(String path,
Charset charset)
URL encodes the provided path using the given character set.
|
void |
removeSafeCharacter(char c) |
void |
setEncodeSpaceAsPlus(boolean encodeSpaceAsPlus) |
public static final URLEncoder DEFAULT
public static final URLEncoder QUERY
public void addSafeCharacter(char c)
public void removeSafeCharacter(char c)
public void setEncodeSpaceAsPlus(boolean encodeSpaceAsPlus)
public String encode(String path, Charset charset)
path - The path to encodecharset - The character set to use to convert the path to bytesCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.