org.apache.axis2.transport.http.util
Class URIEncoderDecoder
java.lang.Object
  
org.apache.axis2.transport.http.util.URIEncoderDecoder
public class URIEncoderDecoder
- extends Object
 
 
| 
Method Summary | 
static String | 
decode(String s)
 
          Decodes the string argument which is assumed to be encoded in the
 x-www-form-urlencoded MIME content type using the UTF-8
 encoding scheme. | 
static String | 
quoteIllegal(String s,
             String legal)
 
          All characters except letters ('a'..'z', 'A'..'Z') and numbers ('0'..'9')
 and legal characters are converted into their hexidecimal value prepended
 by '%'. | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
URIEncoderDecoder
public URIEncoderDecoder()
quoteIllegal
public static String quoteIllegal(String s,
                                  String legal)
                           throws UnsupportedEncodingException
- All characters except letters ('a'..'z', 'A'..'Z') and numbers ('0'..'9')
 and legal characters are converted into their hexidecimal value prepended
 by '%'.
 
 For example: '#' -> %23
 
 Other characters, which are Unicode chars that are not US-ASCII, and are
 not ISO Control or are not ISO Space chars, are preserved.
 
 Called from URI.quoteComponent() (for multiple argument constructors)
 
- Parameters:
 s - java.lang.String the string to be convertedlegal - java.lang.String the characters allowed to be preserved in the
              string s
- Returns:
 - java.lang.String the converted string
 - Throws:
 UnsupportedEncodingException
 
 
decode
public static String decode(String s)
                     throws UnsupportedEncodingException
- Decodes the string argument which is assumed to be encoded in the
 
x-www-form-urlencoded MIME content type using the UTF-8
 encoding scheme.
 
 '%' and two following hex digit characters are converted to the
 equivalent byte value. All other characters are passed through
 unmodified.
 
 
 e.g. "A%20B%20C %24%25" -> "A B C $%"
 
 Called from URI.getXYZ() methods
 
- Parameters:
 s - java.lang.String The encoded string.
- Returns:
 - java.lang.String The decoded version.
 - Throws:
 UnsupportedEncodingException
 
 
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.