org.springframework.extensions.surf.util
Class URLDecoder

java.lang.Object
  extended by org.springframework.extensions.surf.util.URLDecoder

public final class URLDecoder
extends Object

UTF-8 URL character decoder. Based on an optimized and modified version of the JDK source for the class java.net.URLDecoder.

Author:
kevinr

Constructor Summary
URLDecoder()
           
 
Method Summary
static String decode(String s)
          Decodes a application/x-www-form-urlencoded string using a specific encoding scheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLDecoder

public URLDecoder()
Method Detail

decode

public static String decode(String s)
Decodes a application/x-www-form-urlencoded string using a specific encoding scheme.

UTF-8 encoding is used to determine what characters are represented by any consecutive sequences of the form "%xy".

The '+' plus sign is NOT converted to space on the assumption that a sensible URLEncoder class URLEncoder has been used!

Parameters:
s - the non-null String to decode
Returns:
the decoded String


Copyright © 2009 SpringSource, Inc. All Rights Reserved.