public class URLEncoder
extends java.lang.Object
implements java.lang.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) |
java.lang.Object |
clone() |
java.lang.String |
encode(java.lang.String path)
Deprecated.
|
java.lang.String |
encode(java.lang.String path,
java.lang.String encoding)
URL encodes the provided path using the given encoding.
|
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)
@Deprecated public java.lang.String encode(java.lang.String path)
encode(String, String)
path
- The path to encodepublic java.lang.String encode(java.lang.String path, java.lang.String encoding)
path
- The path to encodeencoding
- The encoding to use to convert the path to bytespublic java.lang.Object clone()
clone
in class java.lang.Object
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.