| java.lang.Object com.sun.portal.desktop.encode.Decoder
Decoder | public class Decoder (Code) | | This class provides a device-unaware means of decoding markup and
other text. It is the front end for an decoder SPI, allowing different
encoding schemes to be plugged in to the system.
To encode text, use the Encoder class.
The pluggable components used by this class are called
type decoders. A type decoder is a class that implements
the simple TypeDecoder interface.
For cases where the encoding type is fixed and does not
change with the markup type, the static type decoder may be used:
COOKIE_DECODER.
To add a new type decoder to the system, do the following:
- Author a class that implements the
TypeDecoder
interface.
- Add the class to the web container's class path.
Now, the new type decoder may be referenced by naming its
class name in either of the two methods in this class.
The public methods and members in this class are static. This class
may not be instantiated.
See Also: com.sun.portal.desktop.encode.TypeDecoder See Also: com.sun.portal.desktop.encode.Encoder |
Method Summary | |
public static String | decode(String decoderClassName, String text) Encodes text with the named type encoder. | public static TypeDecoder | get(String decoderClassName) Gets an instance for the named type decoder.
Parameters: decoderClassName - a String value indicating the type decoder class name. |
decode | public static String decode(String decoderClassName, String text) throws EncoderException(Code) | | Encodes text with the named type encoder. This method is a
convenience wrapper for calling get() and
TypeDecoder.decode() .
Parameters: decoderClassName - a String value indicating the type decoder class name. The named class must implementthe TypeDecoder interface. Parameters: text - a String value, the text to bedecoded. a String value, the decoded text. exception: EncoderException - if an error occurs instantiating the namedtype decoder. |
get | public static TypeDecoder get(String decoderClassName) throws EncoderException(Code) | | Gets an instance for the named type decoder.
Parameters: decoderClassName - a String value indicating the type decoder class name. The named class must implementthe TypeDecoder interface. a TypeDecoder value, the type decoder instance. exception: EncoderException - if there is an error instantiating the type decoder object. |
|
|