org.springframework.extensions.surf.util
Class URLEncoder

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

public final class URLEncoder
extends Object

UTF-8 URL character encoder. Based on an optimized and improved version of the w3 Consortium URLUTF8Encoder class.

Author:
kevinr

Constructor Summary
URLEncoder()
           
 
Method Summary
static String encode(String s)
           
static String encodeUri(String s)
          Encode a string to the UTF-8-in-URL proposal.
static String encodeUriComponent(String s)
          Encode a string to the UTF-8-in-URL proposal.
 
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)

encodeUriComponent

public static String encodeUriComponent(String s)
Encode a string to the UTF-8-in-URL proposal. There are some changes from the standard, this is what happens:

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

encodeUri

public static String encodeUri(String s)
Encode a string to the UTF-8-in-URL proposal. There are some changes from the standard, this is what happens:

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


Copyright © 2009 SpringSource, Inc. All Rights Reserved.