Provides the highest level of abstraction for Encoders. This is the sister interface of Decoder. Every implementation of Encoder provides this common generic interface which allows a user to pass a generic Object to any Encoder implementation in the codec package.
| 26 | * |
| 27 | */ |
| 28 | public interface Encoder { |
| 29 | |
| 30 | /** |
| 31 | * Encodes an "Object" and returns the encoded content as an Object. The Objects here may just be |
| 32 | * {@code byte[]} or {@code String}s depending on the implementation used. |
| 33 | * |
| 34 | * @param source |
| 35 | * An object to encode |
| 36 | * @return An "encoded" Object |
| 37 | * @throws EncoderException |
| 38 | * An encoder exception is thrown if the encoder experiences a failure condition during the encoding |
| 39 | * process. |
| 40 | */ |
| 41 | Object encode(Object source) throws EncoderException; |
| 42 | } |
| 43 |
no outgoing calls
no test coverage detected
searching dependent graphs…