Class UrlEncoder
- java.lang.Object
-
- be.wegenenverkeer.rxhttpclient.aws.UrlEncoder
-
public class UrlEncoder extends java.lang.ObjectA collection of utilities for encoding URLs.
-
-
Constructor Summary
Constructors Constructor Description UrlEncoder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringurlDecode(java.lang.String value)Decode a string for use in the path of a URL; uses URLDecoder.decode, which decodes a string for use in the query portion of a URL.static java.lang.StringurlEncode(java.lang.String value, boolean path)Encode a string for use in the path of a URL; uses URLEncoder.encode, (which encodes a string for use in the query portion of a URL), then applies some postfilters to fix things up per the RFC.
-
-
-
Method Detail
-
urlEncode
public static java.lang.String urlEncode(java.lang.String value, boolean path)Encode a string for use in the path of a URL; uses URLEncoder.encode, (which encodes a string for use in the query portion of a URL), then applies some postfilters to fix things up per the RFC. Can optionally handle strings which are meant to encode a path (ie include '/'es which should NOT be escaped).- Parameters:
value- the value to encodepath- true if the value is intended to represent a path- Returns:
- the encoded value
-
urlDecode
public static java.lang.String urlDecode(java.lang.String value)
Decode a string for use in the path of a URL; uses URLDecoder.decode, which decodes a string for use in the query portion of a URL.- Parameters:
value- The value to decode- Returns:
- The decoded value if parameter is not null, otherwise, null is returned.
-
-