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
| 27 | * |
| 28 | */ |
| 29 | public interface Decoder { |
| 30 | |
| 31 | /** |
| 32 | * Decodes an "encoded" Object and returns a "decoded" Object. Note that the implementation of this interface will |
| 33 | * try to cast the Object parameter to the specific type expected by a particular Decoder implementation. If a |
| 34 | * {@link ClassCastException} occurs this decode method will throw a DecoderException. |
| 35 | * |
| 36 | * @param source |
| 37 | * the object to decode |
| 38 | * @return a 'decoded" object |
| 39 | * @throws DecoderException |
| 40 | * a decoder exception can be thrown for any number of reasons. Some good candidates are that the |
| 41 | * parameter passed to this method is null, a param cannot be cast to the appropriate type for a |
| 42 | * specific encoder. |
| 43 | */ |
| 44 | Object decode(Object source) throws DecoderException; |
| 45 | } |
| 46 |
no outgoing calls
no test coverage detected
searching dependent graphs…