org.apache.james.mime4j.message
Class Message

java.lang.Object
  extended by org.apache.james.mime4j.message.Entity
      extended by org.apache.james.mime4j.message.Message
All Implemented Interfaces:
Body, Disposable

public class Message
extends Entity
implements Body

Represents a MIME message. The following code parses a stream into a Message object.

      Message msg = new Message(new FileInputStream("mime.msg"));
 

Version:
$Id: Message.java,v 1.3 2004/10/02 12:41:11 ntherning Exp $

Constructor Summary
Message()
          Creates a new empty Message.
Message(java.io.InputStream is)
          Parses the specified MIME message stream into a Message instance.
Message(java.io.InputStream is, MimeEntityConfig config)
          Parses the specified MIME message stream into a Message instance using given MimeEntityConfig.
 
Method Summary
 UnstructuredField getSubject()
          Gets the Subject field.
 
Methods inherited from class org.apache.james.mime4j.message.Entity
dispose, getBody, getCharset, getContentTransferEncoding, getHeader, getMimeType, getParent, isMimeType, isMultipart, setBody, setHeader, setParent, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.james.mime4j.message.Body
getParent, setParent, writeTo
 
Methods inherited from interface org.apache.james.mime4j.message.Disposable
dispose
 

Constructor Detail

Message

public Message()
Creates a new empty Message.


Message

public Message(java.io.InputStream is,
               MimeEntityConfig config)
        throws MimeException,
               java.io.IOException
Parses the specified MIME message stream into a Message instance using given MimeEntityConfig.

Parameters:
is - the stream to parse.
Throws:
java.io.IOException - on I/O errors.
MimeException

Message

public Message(java.io.InputStream is)
        throws java.io.IOException
Parses the specified MIME message stream into a Message instance.

Parameters:
is - the stream to parse.
Throws:
java.io.IOException - on I/O errors.
Method Detail

getSubject

public UnstructuredField getSubject()
Gets the Subject field.

Returns:
the Subject field or null if it doesn't exist.


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.