org.jboss.soa.esb.listeners.message.mime
Class TextPlainMimeDecoder

java.lang.Object
  extended by org.jboss.soa.esb.listeners.message.mime.TextPlainMimeDecoder
All Implemented Interfaces:
Configurable, MimeDecoder

@MimeType(value="text/plain")
public class TextPlainMimeDecoder
extends java.lang.Object
implements MimeDecoder, Configurable

Mime decoder for mime type "text/plain".

Decodes the bytes to a simple String.

Author:
tom.fennelly@gmail.com

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.soa.esb.listeners.message.mime.MimeDecoder
MimeDecoder.Factory
 
Constructor Summary
TextPlainMimeDecoder()
           
 
Method Summary
 java.lang.Object decode(byte[] bytes)
          Decode the specified array of bytes based on the MimeType annotation on the implementing MimeDecoder.
 void setConfiguration(ConfigTree configTree)
          Set the component configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextPlainMimeDecoder

public TextPlainMimeDecoder()
Method Detail

setConfiguration

public void setConfiguration(ConfigTree configTree)
                      throws ConfigurationException
Description copied from interface: Configurable
Set the component configuration.

Specified by:
setConfiguration in interface Configurable
Parameters:
configTree - The conponent configuration.
Throws:
ConfigurationException - Bad component configuration.

decode

public java.lang.Object decode(byte[] bytes)
                        throws MimeDecodeException
Description copied from interface: MimeDecoder
Decode the specified array of bytes based on the MimeType annotation on the implementing MimeDecoder.

Specified by:
decode in interface MimeDecoder
Parameters:
bytes - The bytes to be decoded.
Returns:
The decoded bytes.
Throws:
MimeDecodeException - Error while decoding the byts array.