Class URLCoder
- java.lang.Object
-
- net.lenni0451.commons.httpclient.utils.URLCoder
-
public class URLCoder extends java.lang.Object
-
-
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 s)Decode a string from a URL.
This method usesStandardCharsets.UTF_8as charset.static java.lang.Stringdecode(java.lang.String s, java.nio.charset.Charset charset)Decode a string from a URL.static java.lang.Stringencode(java.lang.String s)Encode a string to be used in a URL.
This method usesStandardCharsets.UTF_8as charset.static java.lang.Stringencode(java.lang.String s, java.nio.charset.Charset charset)Encode a string to be used in a URL.
-
-
-
Method Detail
-
encode
public static java.lang.String encode(java.lang.String s)
Encode a string to be used in a URL.
This method usesStandardCharsets.UTF_8as charset.- Parameters:
s- The string to encode- Returns:
- The encoded string
-
encode
public static java.lang.String encode(java.lang.String s, java.nio.charset.Charset charset)Encode a string to be used in a URL.- Parameters:
s- The string to encodecharset- The charset to use- Returns:
- The encoded string
-
decode
public static java.lang.String decode(java.lang.String s)
Decode a string from a URL.
This method usesStandardCharsets.UTF_8as charset.- Parameters:
s- The string to decode- Returns:
- The decoded string
-
decode
public static java.lang.String decode(java.lang.String s, java.nio.charset.Charset charset)Decode a string from a URL.- Parameters:
s- The string to decodecharset- The charset to use- Returns:
- The decoded string
-
-