Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis2.transport.http.util
Class URIEncoderDecoder

    java.lang.Object
      org.apache.axis2.transport.http.util.URIEncoderDecoder

    public class URIEncoderDecoder

extends java.lang.Object

Constructor Summary
`URIEncoderDecoder()`

Method Summary
`static java.lang.String` | `decode(java.lang.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 java.lang.String` | `quoteIllegal(java.lang.String s, java.lang.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`

Constructor Detail

### URIEncoderDecoder

    public URIEncoderDecoder()

Method Detail

### quoteIllegal

    public static java.lang.String quoteIllegal(java.lang.String s,
                                                java.lang.String legal)
                                         throws java.io.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 converted
    `legal` - java.lang.String the characters allowed to be preserved in the string s
  Returns:
    java.lang.String the converted string
  Throws:
    `java.io.UnsupportedEncodingException`

### decode

    public static java.lang.String decode(java.lang.String s)
                                   throws java.io.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:
    `java.io.UnsupportedEncodingException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.