at.gv.egovernment.moa.util
Class URLEncoder

java.lang.Object
  |
  +--at.gv.egovernment.moa.util.URLEncoder

public class URLEncoder
extends Object

Translates a string into mime format "x-www-form-urlencoded". Provides a function missing in JDK 1.3.

Version:
$Id$
Author:
Paul Ivancsics

Constructor Summary
URLEncoder()
           
 
Method Summary
static String encode(String s, String encoding)
          Translates a string into x-www-form-urlencoded format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLEncoder

public URLEncoder()
Method Detail

encode

public static String encode(String s,
                            String encoding)
                     throws UnsupportedEncodingException
Translates a string into x-www-form-urlencoded format.
Parameters:
s - the string to be translated
encoding - the encoding to use
Returns:
the translated string
Throws:
UnsupportedEncodingException - when the desired encoding is not supported