org.yestech.lib.util
Class DecoderUtil

java.lang.Object
  extended by org.yestech.lib.util.DecoderUtil

public final class DecoderUtil
extends java.lang.Object

A utility to decode from multiple formats.

Version:
$Revision: $
Author:
Artie Copeland

Method Summary
static java.lang.String htmlDecode(java.lang.String s)
          Decodes 's' by converting each character to its equivalent HTML entity, where one exists.
static java.lang.String uriDecode(java.lang.String encodedStr)
           
static java.lang.String urlDecode(java.lang.String value)
          URL Decodes the string
static java.lang.String urlDecode(java.lang.String value, java.lang.String encoding)
          URL Decodes string using a charset
static java.lang.String xmlDecode(java.lang.String s)
          Decodes 's' by converting each character to its equivalent XML entity, where one exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

urlDecode

public static java.lang.String urlDecode(java.lang.String value)
URL Decodes the string

Parameters:
value -
Returns:

urlDecode

public static java.lang.String urlDecode(java.lang.String value,
                                         java.lang.String encoding)
URL Decodes string using a charset

Parameters:
value -
encoding -
Returns:

htmlDecode

public static java.lang.String htmlDecode(java.lang.String s)
Decodes 's' by converting each character to its equivalent HTML entity, where one exists.

Parameters:
s - the string to convert.
Returns:
a string with entities decoded.

uriDecode

public static java.lang.String uriDecode(java.lang.String encodedStr)
Parameters:
encodedStr -
Returns:

xmlDecode

public static java.lang.String xmlDecode(java.lang.String s)
Decodes 's' by converting each character to its equivalent XML entity, where one exists.

Parameters:
s - the string to convert.
Returns:
a string with entities decoded.


Copyright © 2009 YES Technology Association. All Rights Reserved.