java.lang.Object |
↳ |
com.microstrategy.utils.WebURLEncoder |
Class Overview
This class provides methods to encode a string for use in a URL.
Summary
Public Methods |
static
String
|
doubleEncode(String input, String encodeFormat)
Encode the input String with the encode(String, String) method,
and then replace (1) character '%' with character '-' and
(2) '-' with "--".
|
static
String
|
encode(String input, 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,_,-,*,.
|
static
String
|
encode(String input, String encodeFormat)
a-z,A-Z,0-9,_,-,,.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Methods
public
static
String
doubleEncode
(String input, String encodeFormat)
Encode the input String with the encode(String, String)
method,
and then replace (1) character '%' with character '-' and
(2) '-' with "--".
Parameters
input |
the input string to encode |
encodeFormat |
the format of the string |
Throws
UnsupportedEncodingException
| thrown if the named encoding is not supported. |
public
static
String
encode
(String input, 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,_,-,*,. remain unencoded
all other characters are first encoded and then each byte is represented
using a %HH format
Parameters
input |
the unencoded string |
encodeFormat |
the string format |
maxLength |
maximum string length |
Throws
UnsupportedEncodingException
| thrown if the named encoding is not supported. |
public
static
String
encode
(String input, String encodeFormat)
a-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 string |
encodeFormat |
the string format |
Throws
UnsupportedEncodingException
| thrown if the named encoding is not supported.
|