org.apache.commons.codec
Interface Decoder

All Known Subinterfaces:
BinaryDecoder
All Known Implementing Classes:
Base64

public interface Decoder

Forms one of the two interfaces at the center of the codec package. All decoders implement this interface which allows a user to pass a generic Object to any Decoder implementation in the codec package.

Version:
$Revision: 1.1 $ $Date: 2003/04/25 17:50:56 $
Author:
Tim O'Brien

Method Summary
 java.lang.Object decode(java.lang.Object pObject)
          Decode an "encoded" Object and return a "decoded" Object.
 

Method Detail

decode

public java.lang.Object decode(java.lang.Object pObject)
                        throws DecoderException
Decode an "encoded" Object and return a "decoded" Object. Note that the implementation of this interface will try to cast the Object parameter to the specific type expected by a particular Decoder implementation. If a ClassCastException occurs this decode method will throw a DecoderException.

Parameters:
pObject - an object to "decode"
Returns:
a 'decoded" object
Throws:
DecoderException - a decoder exception can be thrown for any number of reasons. Some good candidates are that the parameter passed to this method is null, a param cannot be cast to the appropriate type for a specific encoder.


Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.