Expresso 5-6

com.jcorporate.expresso.core.misc
Class URLUTF8Encoder

java.lang.Object
  extended bycom.jcorporate.expresso.core.misc.URLUTF8Encoder

public class URLUTF8Encoder
extends Object

Provides a method to encode any string into a URL-safe form, the so-called "x-www-form-urlencoded" form. Non-ASCII characters are first encoded as sequences of two or three bytes, using the UTF-8 algorithm, before being encoded in "x-www-form-urlencoded".


Method Summary
static String decode(String s)
           
static String encode(String s)
          Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public static String encode(String s)
Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal. This is what happens:

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

decode

public static String decode(String s)
Parameters:
s - the string to decode
Returns:
a decoded string

main

public static void main(String[] args)

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.