You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Class grendel.storage.MessageReadOnly

java.lang.Object
   |
   +----javax.mail.Message
           |
           +----grendel.storage.MessageReadOnly

This implements those methods on Message which are commonly used in all of our read-only message implementations. It also provides an implementation for the header-reading routines, all of which assume that the subclass implements getHeadersObj, a method to get an InternetHeaders object for this message.


abstract class  MessageReadOnly
     extends javax.mail.Message
{
          // Constructors 2
     MessageReadOnly();
     MessageReadOnly(Folder, int);

          // Methods 38
     public void addFrom(Address[]) throws MessagingException;
     public void addHeader(String, String) throws MessagingException;
     public void addRecipients(RecipientType, Address[]) throws MessagingException;
     public Enumeration getAllHeaders();
     public String getContentType();
     public String getDescription();
     public String getDisposition();
     public String getFileName();
     public Address[] getFrom() throws MessagingException;
     public String[] getHeader(String) throws MessagingException;
     protected abstract InternetHeaders getHeadersObj() throws MessagingException;
     public InputStream getInputStream() throws MessagingException;
     public InputStream getInputStreamWithHeaders() throws MessagingException;
     public Enumeration getMatchingHeaders(String[]);
     public Enumeration getNonMatchingHeaders(String[]);
     protected String getOneHeader(String) throws MessagingException;
     public Address[] getRecipients(RecipientType) throws MessagingException;
     public Date getSentDate() throws MessagingException;
     public long getSentDateAsLong();
     public String getSubject() throws MessagingException;
     public boolean isMimeType(String);
     protected void readonly() throws MessagingException;
     public void removeHeader(String) throws MessagingException;
     public Message reply(boolean);
     public void setContent(Object, String);
     public void setContent(String) throws MessagingException;
     public void setContent(Multipart);
     public void setDataHandler(DataHandler);
     public void setDescription(String) throws MessagingException;
     public void setDisposition(String) throws MessagingException;
     public void setFileName(String) throws MessagingException;
     public void setFrom() throws MessagingException;
     public void setFrom(Address) throws MessagingException;
     public void setHeader(String, String) throws MessagingException;
     public void setRecipients(RecipientType, Address[]) throws MessagingException;
     public void setSentDate(Date) throws MessagingException;
     public void setSubject(String) throws MessagingException;
     public void setText(String) throws MessagingException;
}



Constructors


MessageReadOnly

   MessageReadOnly() 


MessageReadOnly

   MessageReadOnly(Folder f, 
                   int num) 



Methods


readonly

   protected void readonly()  throws MessagingException


addFrom

   public void addFrom(Address[] addresses)  throws MessagingException
Overrides:
addFrom in class Message


setSubject

   public void setSubject(String s)  throws MessagingException
Overrides:
setSubject in class Message


setRecipients

   public void setRecipients(RecipientType type, 
                             Address[] addresses)  throws MessagingException


addRecipients

   public void addRecipients(RecipientType type, 
                             Address[] addresses)  throws MessagingException


setFrom

   public void setFrom()  throws MessagingException
Overrides:
setFrom in class Message


setFrom

   public void setFrom(Address address)  throws MessagingException
Overrides:
setFrom in class Message


setSentDate

   public void setSentDate(Date d)  throws MessagingException
Overrides:
setSentDate in class Message


getContentType

   public String getContentType() 
Overrides:
getContentType in class Message


getDisposition

   public String getDisposition() 
Overrides:
getDisposition in class Message


getDescription

   public String getDescription() 
Overrides:
getDescription in class Message


getFileName

   public String getFileName() 
Overrides:
getFileName in class Message


setDisposition

   public void setDisposition(String d)  throws MessagingException
Overrides:
setDisposition in class Message


setDescription

   public void setDescription(String d)  throws MessagingException
Overrides:
setDescription in class Message


setFileName

   public void setFileName(String f)  throws MessagingException
Overrides:
setFileName in class Message


setDataHandler

   public void setDataHandler(DataHandler d) 
Overrides:
setDataHandler in class Message


setText

   public void setText(String s)  throws MessagingException
Overrides:
setText in class Message


setContent

   public void setContent(String s)  throws MessagingException


setContent

   public void setContent(Object o, 
                          String s) 
Overrides:
setContent in class Message


setContent

   public void setContent(Multipart m) 
Overrides:
setContent in class Message


addHeader

   public void addHeader(String s1, 
                         String s2)  throws MessagingException
Overrides:
addHeader in class Message


setHeader

   public void setHeader(String s1, 
                         String s2)  throws MessagingException
Overrides:
setHeader in class Message


removeHeader

   public void removeHeader(String s)  throws MessagingException
Overrides:
removeHeader in class Message


getHeadersObj

   protected abstract InternetHeaders getHeadersObj()  throws MessagingException

Get the InternetHeaders object.



getHeader

   public String[] getHeader(String name)  throws MessagingException
Overrides:
getHeader in class Message


getOneHeader

   protected String getOneHeader(String name)  throws MessagingException


getRecipients

   public Address[] getRecipients(RecipientType type)  throws MessagingException


getFrom

   public Address[] getFrom()  throws MessagingException
Overrides:
getFrom in class Message


getSentDate

   public Date getSentDate()  throws MessagingException
Overrides:
getSentDate in class Message


getSentDateAsLong

   public long getSentDateAsLong() 


getSubject

   public String getSubject()  throws MessagingException
Overrides:
getSubject in class Message


getAllHeaders

   public Enumeration getAllHeaders() 
Overrides:
getAllHeaders in class Message


getMatchingHeaders

   public Enumeration getMatchingHeaders(String[] s) 
Overrides:
getMatchingHeaders in class Message


getNonMatchingHeaders

   public Enumeration getNonMatchingHeaders(String[] s) 
Overrides:
getNonMatchingHeaders in class Message


reply

   public Message reply(boolean replyToAll) 
Overrides:
reply in class Message


isMimeType

   public boolean isMimeType(String mimeType) 
Overrides:
isMimeType in class Message


getInputStream

   public InputStream getInputStream()  throws MessagingException

This default implementation of getInputStream() works in terms of getInputStreamWithHeaders. Subclasses are encouraged to define this more directly if they have an easy way of doing so.

Overrides:
getInputStream in class Message


getInputStreamWithHeaders

   public InputStream getInputStreamWithHeaders()  throws MessagingException


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4