Package com.microstrategy.utils
Class WebURLEncoder
- java.lang.Object
 - 
- com.microstrategy.utils.WebURLEncoder
 
 
- 
public class WebURLEncoder extends java.lang.ObjectThis class provides methods to encode a string for use in a URL.- Since:
 - MicroStrategy Web 7.3.1 or earlier
 
 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringdoubleEncode(java.lang.String input, java.lang.String encodeFormat)Encode the input String with theencode(String, String)method, and then replace (1) character '%' with character '-' and (2) '-' with "--".static java.lang.Stringencode(java.lang.String input, java.lang.String encodeFormat)a-z,A-Z,0-9,_,-,,.static java.lang.Stringencode(java.lang.String input, java.lang.String encodeFormat, int maxLength)This method URL encodes a string and truncates the string to the maximum lenght specified in maxLength a-z,A-Z,0-9,_,-,*,. 
 - 
 
- 
- 
Method Detail
- 
encode
public static java.lang.String encode(java.lang.String input, java.lang.String encodeFormat) throws java.io.UnsupportedEncodingExceptiona-z,A-Z,0-9,_,-,,. remain unencoded ' ' space is converted to a + all other characters are first encoded and then each byte is represented using a %HH format- Parameters:
 input- the unencoded stringencodeFormat- the string format- Returns:
 - the encoded string
 - Throws:
 java.io.UnsupportedEncodingException- thrown if the named encoding is not supported.
 
- 
encode
public static java.lang.String encode(java.lang.String input, java.lang.String encodeFormat, int maxLength) throws java.io.UnsupportedEncodingExceptionThis method URL encodes a string and truncates the string to the maximum lenght specified in maxLength a-z,A-Z,0-9,_,-,*,. remain unencoded all other characters are first encoded and then each byte is represented using a %HH format- Parameters:
 input- the unencoded stringencodeFormat- the string formatmaxLength- maximum string length- Returns:
 - the encoded string
 - Throws:
 java.io.UnsupportedEncodingException- thrown if the named encoding is not supported.- Since:
 - MicroStrategy Web 8.0.0
 
 
- 
doubleEncode
public static java.lang.String doubleEncode(java.lang.String input, java.lang.String encodeFormat) throws java.io.UnsupportedEncodingExceptionEncode the input String with theencode(String, String)method, and then replace (1) character '%' with character '-' and (2) '-' with "--".- Parameters:
 input- the input string to encodeencodeFormat- the format of the string- Returns:
 - the encoded string
 - Throws:
 java.io.UnsupportedEncodingException- thrown if the named encoding is not supported.- Since:
 - MicroStrategy Web 7.5.1
 
 
 - 
 
 -