org.pentaho.reporting.libraries.formula.util
Class URLEncoder

java.lang.Object
  extended by org.pentaho.reporting.libraries.formula.util.URLEncoder

public class URLEncoder
extends Object

Creation-Date: Jan 22, 2007, 4:36:38 PM

Author:
Thomas Morgner

Method Summary
static String encode(String s, String encoding)
           
static String encodeUTF8(String s)
          Encode a string according to RFC 1738.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encodeUTF8

public static String encodeUTF8(String s)
Encode a string according to RFC 1738.

"...Only alphanumerics [0-9a-zA-Z], the special characters "$-_.+!*'()," [not including the quotes - ed], and reserved characters used for their reserved purposes may be used unencoded within a URL."

Parameters:
s - The string to be encoded
Returns:
The encoded string

encode

public static String encode(String s,
                            String encoding)
                     throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException