net.fortuna.mstor
Class MStorMessage

java.lang.Object
  extended by javax.mail.Message
      extended by javax.mail.internet.MimeMessage
          extended by net.fortuna.mstor.MStorMessage
All Implemented Interfaces:
Serializable, MimePart, Part

public class MStorMessage
extends MimeMessage
implements Serializable

Implementation of a message for the mstor javamail provider.

Author:
benfortuna
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage
MimeMessage.RecipientType
 
Field Summary
 
Fields inherited from class javax.mail.internet.MimeMessage
content, contentStream, dh, flags, headers, modified, saved
 
Fields inherited from class javax.mail.Message
expunged, folder, msgnum, session
 
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
MStorMessage(Folder folder, InputStream in, int msgnum)
           
MStorMessage(Folder folder, int msgnum)
           
MStorMessage(Folder folder, InternetHeaders headers, byte[] content, int msgnum)
           
MStorMessage(MimeMessage m)
           
MStorMessage(Session session)
           
MStorMessage(Session session, InputStream in)
           
 
Method Summary
 void addHeader(String s, String s1)
           
 void addHeaderLine(String s)
           
 Enumeration getAllHeaderLines()
           
 Enumeration getAllHeaders()
           
protected  InputStream getContentStream()
           
 String[] getHeader(String arg0)
           
 String getHeader(String arg0, String arg1)
           
 Enumeration getMatchingHeaderLines(String[] arg0)
           
 Enumeration getMatchingHeaders(String[] arg0)
           
 Enumeration getNonMatchingHeaderLines(String[] arg0)
           
 Enumeration getNonMatchingHeaders(String[] arg0)
           
 Date getReceivedDate()
           
 void removeHeader(String s)
           
 void saveChanges()
          Attempts to save metadata after calling saveChanges in the superclass.
protected  void setExpunged(boolean expunged)
           
 void setFlag(Flags.Flag flag, boolean set)
           
 void setFlags(Flags flags, boolean set)
           
 void setHeader(String s, String s1)
           
 void setMeta(MetaMessage meta)
           
protected  void updateHeaders()
          Attempts to update headers in metadata after updating headers in superclass.
 
Methods inherited from class javax.mail.internet.MimeMessage
addFrom, addRecipients, addRecipients, createInternetHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getInputStream, getLineCount, getMessageID, getRawInputStream, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, parse, reply, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, writeTo, writeTo
 
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setMessageNumber, setRecipient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MStorMessage

public MStorMessage(Session session)
Parameters:
arg0 -

MStorMessage

public MStorMessage(Session session,
                    InputStream in)
             throws MessagingException
Parameters:
arg0 -
arg1 -
Throws:
MessagingException

MStorMessage

public MStorMessage(MimeMessage m)
             throws MessagingException
Parameters:
arg0 -
Throws:
MessagingException

MStorMessage

public MStorMessage(Folder folder,
                    int msgnum)
Parameters:
arg0 -
arg1 -

MStorMessage

public MStorMessage(Folder folder,
                    InputStream in,
                    int msgnum)
             throws MessagingException
Parameters:
arg0 -
arg1 -
arg2 -
Throws:
MessagingException

MStorMessage

public MStorMessage(Folder folder,
                    InternetHeaders headers,
                    byte[] content,
                    int msgnum)
             throws MessagingException
Parameters:
arg0 -
arg1 -
arg2 -
arg3 -
Throws:
MessagingException
Method Detail

setMeta

public final void setMeta(MetaMessage meta)
Parameters:
meta - The meta to set.

getAllHeaderLines

public final Enumeration getAllHeaderLines()
                                    throws MessagingException
Specified by:
getAllHeaderLines in interface MimePart
Overrides:
getAllHeaderLines in class MimeMessage
Throws:
MessagingException

getAllHeaders

public final Enumeration getAllHeaders()
                                throws MessagingException
Specified by:
getAllHeaders in interface Part
Overrides:
getAllHeaders in class MimeMessage
Throws:
MessagingException

getHeader

public final String getHeader(String arg0,
                              String arg1)
                       throws MessagingException
Specified by:
getHeader in interface MimePart
Overrides:
getHeader in class MimeMessage
Throws:
MessagingException

getHeader

public final String[] getHeader(String arg0)
                         throws MessagingException
Specified by:
getHeader in interface Part
Overrides:
getHeader in class MimeMessage
Throws:
MessagingException

getMatchingHeaderLines

public final Enumeration getMatchingHeaderLines(String[] arg0)
                                         throws MessagingException
Specified by:
getMatchingHeaderLines in interface MimePart
Overrides:
getMatchingHeaderLines in class MimeMessage
Throws:
MessagingException

getMatchingHeaders

public final Enumeration getMatchingHeaders(String[] arg0)
                                     throws MessagingException
Specified by:
getMatchingHeaders in interface Part
Overrides:
getMatchingHeaders in class MimeMessage
Throws:
MessagingException

getNonMatchingHeaderLines

public final Enumeration getNonMatchingHeaderLines(String[] arg0)
                                            throws MessagingException
Specified by:
getNonMatchingHeaderLines in interface MimePart
Overrides:
getNonMatchingHeaderLines in class MimeMessage
Throws:
MessagingException

getNonMatchingHeaders

public final Enumeration getNonMatchingHeaders(String[] arg0)
                                        throws MessagingException
Specified by:
getNonMatchingHeaders in interface Part
Overrides:
getNonMatchingHeaders in class MimeMessage
Throws:
MessagingException

getContentStream

protected final InputStream getContentStream()
                                      throws MessagingException
Overrides:
getContentStream in class MimeMessage
Throws:
MessagingException

setExpunged

protected final void setExpunged(boolean expunged)
Overrides:
setExpunged in class Message

getReceivedDate

public final Date getReceivedDate()
                           throws MessagingException
Overrides:
getReceivedDate in class MimeMessage
Throws:
MessagingException

setFlags

public final void setFlags(Flags flags,
                           boolean set)
                    throws MessagingException
Overrides:
setFlags in class MimeMessage
Throws:
MessagingException

setFlag

public final void setFlag(Flags.Flag flag,
                          boolean set)
                   throws MessagingException
Overrides:
setFlag in class Message
Throws:
MessagingException

setHeader

public final void setHeader(String s,
                            String s1)
                     throws MessagingException
Specified by:
setHeader in interface Part
Overrides:
setHeader in class MimeMessage
Throws:
MessagingException

addHeader

public final void addHeader(String s,
                            String s1)
                     throws MessagingException
Specified by:
addHeader in interface Part
Overrides:
addHeader in class MimeMessage
Throws:
MessagingException

removeHeader

public final void removeHeader(String s)
                        throws MessagingException
Specified by:
removeHeader in interface Part
Overrides:
removeHeader in class MimeMessage
Throws:
MessagingException

addHeaderLine

public final void addHeaderLine(String s)
                         throws MessagingException
Specified by:
addHeaderLine in interface MimePart
Overrides:
addHeaderLine in class MimeMessage
Throws:
MessagingException

saveChanges

public final void saveChanges()
                       throws MessagingException
Attempts to save metadata after calling saveChanges in the superclass.

Overrides:
saveChanges in class MimeMessage
Throws:
MessagingException

updateHeaders

protected final void updateHeaders()
                            throws MessagingException
Attempts to update headers in metadata after updating headers in superclass.

Overrides:
updateHeaders in class MimeMessage
Throws:
MessagingException