Class Encode
java.lang.Object
org.jboss.resteasy.util.Encode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondecode an encoded mapdecode an encoded mapstatic String
static String
decodePath
(String path) static String
encodeFragment
(String value) Keep encoded values "%..." and template parameters intact.static String
encodeFragmentAsIs
(String nameOrValue) protected static String
encodeFromArray
(String segment, String[] encodingMap, boolean encodePercent) static String
encodeMatrixParam
(String value) Keep encoded values "%..." and template parameters intact.static String
encodeNonCodes
(String string) Encode '%' if it is not an encoding sequencestatic String
encodePath
(String value) Keep encoded values "%...", matrix parameters, template parameters, and '/' characters intact.static String
encodePathAsIs
(String segment) Encode via RFC 3986.static String
encodePathSaveEncodings
(String segment) Keep any valid encodings from string i.e.static String
encodePathSegment
(String value) Keep encoded values "%...", matrix parameters and template parameters intact.static String
encodePathSegmentAsIs
(String segment) Encode via RFC 3986.static String
encodePathSegmentSaveEncodings
(String segment) Keep any valid encodings from string i.e.static String
encodeQueryParam
(String value) Keep encoded values "%..." and template parameters intact.static String
encodeQueryParamAsIs
(String nameOrValue) Encodes everything of a query parameter name or value.static String
encodeQueryParamSaveEncodings
(String segment) Keep any valid encodings from string i.e.static String
encodeQueryString
(String value) Keep encoded values "%..." and template parameters intact.static String
Calls URLEncoder.encode(s, "UTF-8") on given input.static String
encodeValue
(String segment, String[] encoding) Keep encoded values "%..." and template parameters intact i.e.static String
pathParamReplacement
(String segment, List<String> params) static boolean
savePathParams
(String segmentString, StringBuilder newSegment, List<String> params)
-
Constructor Details
-
Encode
public Encode()
-
-
Method Details
-
encodeQueryString
-
encodePath
-
encodePathSegment
-
encodeFragment
-
encodeMatrixParam
-
encodeQueryParam
-
decodePath
-
encodeNonCodes
-
savePathParams
public static boolean savePathParams(String segmentString, StringBuilder newSegment, List<String> params) -
encodeValue
-
encodePathAsIs
Encode via RFC 3986. PCHAR is allowed allong with '/'unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- Parameters:
segment
- value to encode- Returns:
- encoded value
-
encodePathSaveEncodings
-
encodePathSegmentAsIs
Encode via RFC 3986. PCHAR is allowed allong with '/'unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- Parameters:
segment
- value to encode- Returns:
- encoded value
-
encodePathSegmentSaveEncodings
-
encodeQueryParamAsIs
-
encodeQueryParamSaveEncodings
-
encodeFragmentAsIs
-
encodeFromArray
-
encodeString
-
pathParamReplacement
-
decode
-
decode
-
encode
-
decode
-