Package org.postgresql.util
Class URLCoder
- java.lang.Object
-
- org.postgresql.util.URLCoder
-
public final class URLCoder extends java.lang.ObjectThis class helps with URL encoding and decoding. UTF-8 encoding is used by default to make encoding consistent across the driver, and encoding might be changed via
postgresql.url.encodingpropertyNote: this should not be used outside of PostgreSQL source, this is not a public API of the driver.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringENCODING_FOR_URL
-
Constructor Summary
Constructors Constructor Description URLCoder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringdecode(java.lang.String encoded)Decodesx-www-form-urlencodedstring into Java string.static java.lang.Stringencode(java.lang.String plain)Encodes Java string intox-www-form-urlencodedformat
-
-
-
Method Detail
-
decode
public static java.lang.String decode(java.lang.String encoded)
Decodesx-www-form-urlencodedstring into Java string.- Parameters:
encoded- encoded value- Returns:
- decoded value
- See Also:
URLDecoder.decode(String, String)
-
encode
public static java.lang.String encode(java.lang.String plain)
Encodes Java string intox-www-form-urlencodedformat- Parameters:
plain- input value- Returns:
- encoded value
- See Also:
URLEncoder.encode(String, String)
-
-