Package org.apache.tapestry5.services
Interface URLEncoder
- All Known Implementing Classes:
URLEncoderImpl
public interface URLEncoder
Service used to encode or decode strings that are placed into URLs. This is used as an alternative to UUEncoding.
Alphabetics, numbers and some punctuation ("-", "_", ".", ":") are passed through as is, the "$" character is an
escape, followed by either another "$", or by a four digit hex unicode number. A null input (not a blank input, but
actual null) has a special encoding, "$N". Likewise, the blank string has the special encoding "$B".
-
Method Summary
-
Method Details
-
encode
Given an input value containing any characters, returns the input string, or an encoded version of the string (as outlined above).- Parameters:
input
- string to be encoded, which may be null- Returns:
- encoded version of input
-
decode
Given a previously encoded string, returns the original input.- Parameters:
input
- encoded string (may not be null)- Returns:
- decoded input
-