org.opencrx.application.mail.importer
Class MessageContent

java.lang.Object
  extended by org.opencrx.application.mail.importer.MessageContent

public class MessageContent
extends Object

Utility class to be able to handle non text content of email messages.


Constructor Summary
MessageContent(String id, String section, String mimeType, Object binaryContent)
          Constructor.
 
Method Summary
 Object getContent()
          Returns the message content as Object.
 String getContentType()
          Returns the type of this instance of MessageContent.
 String getId()
          Returns the id of this instance of MessageContent.
 InputStream getInputStream()
          Returns an InputStream to be able to read the real content of the MessageContent object from.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageContent

public MessageContent(String id,
                      String section,
                      String mimeType,
                      Object binaryContent)
Constructor. MessageContent instances can only be created by providing values for each of it's members, no setter methods are provided.

Parameters:
id - The id, e.g. the filename of the message content
section - content section
mimeType - The mime type of the content
binaryContent - The content
Method Detail

getInputStream

public InputStream getInputStream()
Returns an InputStream to be able to read the real content of the MessageContent object from.

Returns:
The InputStream to read the message content from

getContent

public Object getContent()
Returns the message content as Object.

Returns:
The message content in object form

getContentType

public String getContentType()
Returns the type of this instance of MessageContent.

Returns:
The message content's type

getId

public String getId()
Returns the id of this instance of MessageContent.

Returns:
The message content's id

toString

public String toString()
Overrides:
toString in class Object


This software is published under the BSD license. Copyright © 2003-2008, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.