Interface Decoder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object decode​(java.lang.Object source)
      Decodes an "encoded" Object and returns a "decoded" Object.
    • Method Detail

      • decode

        java.lang.Object decode​(java.lang.Object source)
                         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 a ClassCastException occurs, this decode method will throw a DecoderException.
        Parameters:
        source - the object to decode.
        Returns:
        A "decoded" object.
        Throws:
        DecoderException - Thrown if decoding fails, for example, because the parameter is null or cannot be cast to the appropriate type for a specific decoder.