Decoder (Encode/Decode Utilities (Version 1.10))
Date: 2018-10-22

org.apache.commons.codec

## Interface Decoder

- All Known Subinterfaces:
    BinaryDecoder, StringDecoder
  All Known Implementing Classes:
    Base32, Base64, BaseNCodec, BCodec, BinaryCodec, Hex, QCodec, QuotedPrintableCodec, URLCodec

      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.

  Version:
    $Id: Decoder.java 1379145 2012-08-30 21:02:52Z tn $

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and 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` - 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.

commons-codec version 1.10 - Copyright © 2002-2018 - Apache Software Foundation