Package org.apache.directory.api.asn1
Interface Decoder
-
public interface Decoder
Provides the highest level of abstraction for Decoders. This is the sister interface of
Encoder
. All Decoders implement this common generic interface.Allows a user to pass a generic Object to any Decoder implementation in the codec package.
One of the two interfaces at the center of the codec package.
- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
decode(Object object)
Decodes an "encoded" Object and returns a "decoded" Object.
-
-
-
Method Detail
-
decode
Object decode(Object object) throws DecoderException
Decodes an "encoded" Object and returns 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 aClassCastException
occurs this decode method will throw a DecoderException.- Parameters:
object
- 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.
-
-