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.struts2.util
Class URLDecoderUtil

    java.lang.Object
      org.apache.struts2.util.URLDecoderUtil

    public class URLDecoderUtil

extends Object

URLDecoderUtil serves as a facade for a correct URL decoding implementation. As of Struts 2.3.25 it uses Tomcat URLDecoder functionality rather than the one found in java.io.

Constructor Summary
`URLDecoderUtil()`

Method Summary
`static String` | `decode(String sequence, String charset)` Decodes a `x-www-form-urlencoded` string.
`static String` | `decode(String sequence, String charset, boolean isQueryString)` Decodes a `x-www-form-urlencoded` string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### URLDecoderUtil

    public URLDecoderUtil()

Method Detail

### decode

    public static String decode(String sequence,
                                String charset)

  Decodes a `x-www-form-urlencoded` string.

  Parameters:
    `sequence` - the String to decode
    `charset` - The name of a supported character encoding.
  Returns:
    the newly decoded `String`
  Throws:
    `IllegalArgumentException` - If the encoding is not valid

### decode

    public static String decode(String sequence,
                                String charset,
                                boolean isQueryString)

  Decodes a `x-www-form-urlencoded` string.

  Parameters:
    `sequence` - the String to decode
    `charset` - The name of a supported character encoding.
    `isQueryString` - whether input is a query string. If `true` other decoding rules apply.
  Returns:
    the newly decoded `String`
  Throws:
    `IllegalArgumentException` - If the encoding is not valid

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 © 2000–2018 Apache Software Foundation. All rights reserved.