org.joe_e.charset
Class URLEncoding

java.lang.Object
  extended by org.joe_e.charset.URLEncoding

public class URLEncoding
extends Object

Class for converting strings to and from the application/x-www-form-urlencoded MIME format used for HTML forms. Uses the UTF-8 character encoding, as specified by W3C. This class contains static methods for converting strings between human-readable text form and its corresponding encoding.


Method Summary
static String decode(String segment)
          URL decode a segment.
static String encode(String value)
          URL encode a value.
 
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 value)
URL encode a value.

Parameters:
value - The value to encode.
Returns:
The encoded URL segment.

decode

public static String decode(String segment)
URL decode a segment.

Parameters:
segment - The segment to decode.
Returns:
The decoded value.