org.apache.beehive.netui.core
Class URLCodec

Object
  extended by URLCodec

public final class URLCodec
extends Object

Class that provides static methods for URL encoding/decoding


Constructor Summary
URLCodec()
           
 
Method Summary
static String decode(String encoded)
          URL decodes a string using the default character set
static String decode(String encoded, String charset)
          URL decodes a string.
static String encode(String decoded)
          URL encodes a string using the default character set
static String encode(String decoded, String charset)
          URL encodes a string.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLCodec

public URLCodec()
Method Detail

encode

public static String encode(String decoded,
                            String charset)
                     throws UnsupportedEncodingException
URL encodes a string.

Parameters:
decoded - the string to encode
charset - the character set to use
Returns:
the encoded string
Throws:
UnsupportedEncodingException

encode

public static String encode(String decoded)
URL encodes a string using the default character set

Parameters:
decoded - the string to encode
Returns:
the encoded string

decode

public static String decode(String encoded,
                            String charset)
                     throws UnsupportedEncodingException
URL decodes a string.

Parameters:
encoded - the string to decode
charset - the character set to use
Returns:
the decoded string
Throws:
UnsupportedEncodingException

decode

public static String decode(String encoded)
URL decodes a string using the default character set

Parameters:
encoded - the string to decode
Returns:
the decoded string