oracle.portal.utils.v1
Class MultiByteDecoder

java.lang.Object
  |
  +--oracle.portal.utils.v1.MultiByteDecoder

public final class MultiByteDecoder
extends java.lang.Object

The class contains a utility method for decoding an arbitrary String encoded using the same scheme as MultiByteEncoder.


Constructor Summary
MultiByteDecoder()
           
 
Method Summary
static java.lang.String decode(java.lang.String value, java.lang.String encoding)
          Decodes a String encoded using a MultiByteEncoder.
static java.lang.String decodeUTF(java.lang.String value)
          Decodes a String encoded using a MultiByteEncoder.
static boolean needsDecoding(java.lang.String token)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiByteDecoder

public MultiByteDecoder()
Method Detail

decode

public static java.lang.String decode(java.lang.String value,
                                      java.lang.String encoding)
                               throws java.io.UnsupportedEncodingException
Decodes a String encoded using a MultiByteEncoder.
Parameters:
value - String to be translated.
encoding - the IANA character encoding to be used to convert byte sequences into characters(e.g. "UTF-8").
Returns:
the translated String.
Throws:
java.io.UnsupportedEncodingException - if the given encoding is not a supported IANA character encoding.

decodeUTF

public static java.lang.String decodeUTF(java.lang.String value)
Decodes a String encoded using a MultiByteEncoder. Defaults the encoding to UTF-8
Parameters:
value - String to be translated.
Returns:
the translated String.

needsDecoding

public static final boolean needsDecoding(java.lang.String token)