public class MimeMessageCopyOnWriteProxy extends javax.mail.internet.MimeMessage implements Disposable
Modifier and Type | Class and Description |
---|---|
protected static class |
MimeMessageCopyOnWriteProxy.MessageReferenceTracker
Used internally to track the reference count It is important that this is
static otherwise it will keep a reference to the parent object.
|
Modifier and Type | Field and Description |
---|---|
protected MimeMessageCopyOnWriteProxy.MessageReferenceTracker |
refCount |
Constructor and Description |
---|
MimeMessageCopyOnWriteProxy(javax.mail.internet.MimeMessage original) |
MimeMessageCopyOnWriteProxy(MimeMessageSource original) |
Modifier and Type | Method and Description |
---|---|
void |
addFrom(javax.mail.Address[] addresses) |
void |
addHeader(String name,
String value) |
void |
addHeaderLine(String line) |
void |
addRecipient(javax.mail.internet.MimeMessage.RecipientType arg0,
javax.mail.Address arg1) |
void |
addRecipients(javax.mail.Message.RecipientType type,
javax.mail.Address[] addresses) |
void |
addRecipients(javax.mail.Message.RecipientType type,
String addresses) |
void |
dispose()
Dispose the object
|
boolean |
equals(Object arg0) |
Enumeration |
getAllHeaderLines() |
Enumeration |
getAllHeaders() |
javax.mail.Address[] |
getAllRecipients() |
Object |
getContent() |
String |
getContentID() |
String[] |
getContentLanguage() |
String |
getContentMD5() |
String |
getContentType() |
DataHandler |
getDataHandler() |
String |
getDescription() |
String |
getDisposition() |
String |
getEncoding() |
String |
getFileName() |
javax.mail.Flags |
getFlags() |
javax.mail.Folder |
getFolder() |
javax.mail.Address[] |
getFrom() |
String[] |
getHeader(String name) |
String |
getHeader(String name,
String delimiter) |
InputStream |
getInputStream() |
int |
getLineCount() |
Enumeration |
getMatchingHeaderLines(String[] names) |
Enumeration |
getMatchingHeaders(String[] names) |
String |
getMessageID() |
int |
getMessageNumber() |
long |
getMessageSize() |
Enumeration |
getNonMatchingHeaderLines(String[] names) |
Enumeration |
getNonMatchingHeaders(String[] names) |
InputStream |
getRawInputStream() |
Date |
getReceivedDate() |
javax.mail.Address[] |
getRecipients(javax.mail.Message.RecipientType type) |
javax.mail.Address[] |
getReplyTo() |
javax.mail.Address |
getSender() |
Date |
getSentDate() |
int |
getSize() |
String |
getSubject() |
javax.mail.internet.MimeMessage |
getWrappedMessage()
Return wrapped mimeMessage
|
protected javax.mail.internet.MimeMessage |
getWrappedMessageForWriting()
Check the number of references over the MimeMessage and clone it if
needed before returning the reference
|
int |
hashCode() |
boolean |
isExpunged() |
boolean |
isMimeType(String mimeType) |
boolean |
isSet(javax.mail.Flags.Flag flag) |
boolean |
match(javax.mail.search.SearchTerm arg0) |
void |
removeHeader(String name) |
javax.mail.Message |
reply(boolean replyToAll)
This does not need a writable message
|
void |
saveChanges() |
void |
setContent(javax.mail.Multipart mp) |
void |
setContent(Object o,
String type) |
void |
setContentID(String cid) |
void |
setContentLanguage(String[] languages) |
void |
setContentMD5(String md5) |
void |
setDataHandler(DataHandler dh) |
void |
setDescription(String description) |
void |
setDescription(String description,
String charset) |
void |
setDisposition(String disposition) |
void |
setFileName(String filename) |
void |
setFlag(javax.mail.Flags.Flag arg0,
boolean arg1) |
void |
setFlags(javax.mail.Flags flag,
boolean set) |
void |
setFrom() |
void |
setFrom(javax.mail.Address address) |
void |
setHeader(String name,
String value) |
void |
setRecipients(javax.mail.Message.RecipientType type,
javax.mail.Address[] addresses) |
void |
setRecipients(javax.mail.Message.RecipientType type,
String addresses) |
void |
setReplyTo(javax.mail.Address[] addresses) |
void |
setSender(javax.mail.Address arg0) |
void |
setSentDate(Date d) |
void |
setSubject(String subject) |
void |
setSubject(String subject,
String charset) |
void |
setText(String text) |
void |
setText(String text,
String charset) |
void |
setText(String text,
String charset,
String subtype)
Since javamail 1.4
|
String |
toString() |
void |
writeTo(OutputStream os)
Rewritten for optimization purposes
|
void |
writeTo(OutputStream os,
String[] ignoreList)
Rewritten for optimization purposes
|
createInternetHeaders, createMimeMessage, getContentStream, parse, updateHeaders, updateMessageID
protected MimeMessageCopyOnWriteProxy.MessageReferenceTracker refCount
public MimeMessageCopyOnWriteProxy(javax.mail.internet.MimeMessage original) throws javax.mail.MessagingException
original
- MimeMessageWrapperjavax.mail.MessagingException
public MimeMessageCopyOnWriteProxy(MimeMessageSource original) throws javax.mail.MessagingException
original
- MimeMessageSourcejavax.mail.MessagingException
protected javax.mail.internet.MimeMessage getWrappedMessageForWriting() throws javax.mail.MessagingException
javax.mail.MessagingException
- exceptionpublic javax.mail.internet.MimeMessage getWrappedMessage()
public void dispose()
Disposable
dispose
in interface Disposable
Disposable.dispose()
public void writeTo(OutputStream os) throws IOException, javax.mail.MessagingException
writeTo
in interface javax.mail.Part
writeTo
in class javax.mail.internet.MimeMessage
IOException
javax.mail.MessagingException
public void writeTo(OutputStream os, String[] ignoreList) throws IOException, javax.mail.MessagingException
writeTo
in class javax.mail.internet.MimeMessage
IOException
javax.mail.MessagingException
public javax.mail.Address[] getFrom() throws javax.mail.MessagingException
getFrom
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getFrom()
public javax.mail.Address[] getRecipients(javax.mail.Message.RecipientType type) throws javax.mail.MessagingException
getRecipients
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getRecipients(javax.mail.Message.RecipientType)
public javax.mail.Address[] getAllRecipients() throws javax.mail.MessagingException
getAllRecipients
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getAllRecipients()
public javax.mail.Address[] getReplyTo() throws javax.mail.MessagingException
getReplyTo
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getReplyTo()
public String getSubject() throws javax.mail.MessagingException
getSubject
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getSubject()
public Date getSentDate() throws javax.mail.MessagingException
getSentDate
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getSentDate()
public Date getReceivedDate() throws javax.mail.MessagingException
getReceivedDate
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getReceivedDate()
public int getSize() throws javax.mail.MessagingException
getSize
in interface javax.mail.Part
getSize
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getSize()
public int getLineCount() throws javax.mail.MessagingException
getLineCount
in interface javax.mail.Part
getLineCount
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getLineCount()
public String getContentType() throws javax.mail.MessagingException
getContentType
in interface javax.mail.Part
getContentType
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getContentType()
public boolean isMimeType(String mimeType) throws javax.mail.MessagingException
isMimeType
in interface javax.mail.Part
isMimeType
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.isMimeType(java.lang.String)
public String getDisposition() throws javax.mail.MessagingException
getDisposition
in interface javax.mail.Part
getDisposition
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getDisposition()
public String getEncoding() throws javax.mail.MessagingException
getEncoding
in interface javax.mail.internet.MimePart
getEncoding
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getEncoding()
public String getContentID() throws javax.mail.MessagingException
getContentID
in interface javax.mail.internet.MimePart
getContentID
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getContentID()
public String getContentMD5() throws javax.mail.MessagingException
getContentMD5
in interface javax.mail.internet.MimePart
getContentMD5
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getContentMD5()
public String getDescription() throws javax.mail.MessagingException
getDescription
in interface javax.mail.Part
getDescription
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getDescription()
public String[] getContentLanguage() throws javax.mail.MessagingException
getContentLanguage
in interface javax.mail.internet.MimePart
getContentLanguage
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getContentLanguage()
public String getMessageID() throws javax.mail.MessagingException
getMessageID
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.getMessageID()
public String getFileName() throws javax.mail.MessagingException
getFileName
in interface javax.mail.Part
getFileName
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getFileName()
public InputStream getInputStream() throws IOException, javax.mail.MessagingException
getInputStream
in interface javax.mail.Part
getInputStream
in class javax.mail.internet.MimeMessage
IOException
javax.mail.MessagingException
Part.getInputStream()
public DataHandler getDataHandler() throws javax.mail.MessagingException
getDataHandler
in interface javax.mail.Part
getDataHandler
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getDataHandler()
public Object getContent() throws IOException, javax.mail.MessagingException
getContent
in interface javax.mail.Part
getContent
in class javax.mail.internet.MimeMessage
IOException
javax.mail.MessagingException
Part.getContent()
public String[] getHeader(String name) throws javax.mail.MessagingException
getHeader
in interface javax.mail.Part
getHeader
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getHeader(java.lang.String)
public String getHeader(String name, String delimiter) throws javax.mail.MessagingException
getHeader
in interface javax.mail.internet.MimePart
getHeader
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getHeader(java.lang.String,
java.lang.String)
public Enumeration getAllHeaders() throws javax.mail.MessagingException
getAllHeaders
in interface javax.mail.Part
getAllHeaders
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getAllHeaders()
public Enumeration getMatchingHeaders(String[] names) throws javax.mail.MessagingException
getMatchingHeaders
in interface javax.mail.Part
getMatchingHeaders
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getMatchingHeaders(java.lang.String[])
public Enumeration getNonMatchingHeaders(String[] names) throws javax.mail.MessagingException
getNonMatchingHeaders
in interface javax.mail.Part
getNonMatchingHeaders
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.getNonMatchingHeaders(java.lang.String[])
public Enumeration getAllHeaderLines() throws javax.mail.MessagingException
getAllHeaderLines
in interface javax.mail.internet.MimePart
getAllHeaderLines
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getAllHeaderLines()
public Enumeration getMatchingHeaderLines(String[] names) throws javax.mail.MessagingException
getMatchingHeaderLines
in interface javax.mail.internet.MimePart
getMatchingHeaderLines
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getMatchingHeaderLines(java.lang.String[])
public Enumeration getNonMatchingHeaderLines(String[] names) throws javax.mail.MessagingException
getNonMatchingHeaderLines
in interface javax.mail.internet.MimePart
getNonMatchingHeaderLines
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.getNonMatchingHeaderLines(java.lang.String[])
public javax.mail.Flags getFlags() throws javax.mail.MessagingException
getFlags
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.getFlags()
public boolean isSet(javax.mail.Flags.Flag flag) throws javax.mail.MessagingException
isSet
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.isSet(javax.mail.Flags.Flag)
public javax.mail.Address getSender() throws javax.mail.MessagingException
getSender
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.getSender()
public boolean match(javax.mail.search.SearchTerm arg0) throws javax.mail.MessagingException
match
in class javax.mail.Message
javax.mail.MessagingException
Message.match(javax.mail.search.SearchTerm)
public InputStream getRawInputStream() throws javax.mail.MessagingException
getRawInputStream
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.getRawInputStream()
public javax.mail.Folder getFolder()
getFolder
in class javax.mail.Message
Message.getFolder()
public int getMessageNumber()
getMessageNumber
in class javax.mail.Message
Message.getMessageNumber()
public boolean isExpunged()
isExpunged
in class javax.mail.Message
Message.isExpunged()
public boolean equals(Object arg0)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object.toString()
public void setFrom(javax.mail.Address address) throws javax.mail.MessagingException
setFrom
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.setFrom(javax.mail.Address)
public void setFrom() throws javax.mail.MessagingException
setFrom
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.setFrom()
public void addFrom(javax.mail.Address[] addresses) throws javax.mail.MessagingException
addFrom
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.addFrom(javax.mail.Address[])
public void setRecipients(javax.mail.Message.RecipientType type, javax.mail.Address[] addresses) throws javax.mail.MessagingException
setRecipients
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.setRecipients(javax.mail.Message.RecipientType,
javax.mail.Address[])
public void addRecipients(javax.mail.Message.RecipientType type, javax.mail.Address[] addresses) throws javax.mail.MessagingException
addRecipients
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.addRecipients(javax.mail.Message.RecipientType,
javax.mail.Address[])
public void setReplyTo(javax.mail.Address[] addresses) throws javax.mail.MessagingException
setReplyTo
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.setReplyTo(javax.mail.Address[])
public void setSubject(String subject) throws javax.mail.MessagingException
setSubject
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.setSubject(java.lang.String)
public void setSubject(String subject, String charset) throws javax.mail.MessagingException
setSubject
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.setSubject(java.lang.String,
java.lang.String)
public void setSentDate(Date d) throws javax.mail.MessagingException
setSentDate
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.setSentDate(java.util.Date)
public void setDisposition(String disposition) throws javax.mail.MessagingException
setDisposition
in interface javax.mail.Part
setDisposition
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setDisposition(java.lang.String)
public void setContentID(String cid) throws javax.mail.MessagingException
setContentID
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.setContentID(java.lang.String)
public void setContentMD5(String md5) throws javax.mail.MessagingException
setContentMD5
in interface javax.mail.internet.MimePart
setContentMD5
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.setContentMD5(java.lang.String)
public void setDescription(String description) throws javax.mail.MessagingException
setDescription
in interface javax.mail.Part
setDescription
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setDescription(java.lang.String)
public void setDescription(String description, String charset) throws javax.mail.MessagingException
setDescription
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.setDescription(java.lang.String,
java.lang.String)
public void setContentLanguage(String[] languages) throws javax.mail.MessagingException
setContentLanguage
in interface javax.mail.internet.MimePart
setContentLanguage
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.setContentLanguage(java.lang.String[])
public void setFileName(String filename) throws javax.mail.MessagingException
setFileName
in interface javax.mail.Part
setFileName
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setFileName(java.lang.String)
public void setDataHandler(DataHandler dh) throws javax.mail.MessagingException
setDataHandler
in interface javax.mail.Part
setDataHandler
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setDataHandler(javax.activation.DataHandler)
public void setContent(Object o, String type) throws javax.mail.MessagingException
setContent
in interface javax.mail.Part
setContent
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setContent(java.lang.Object, java.lang.String)
public void setText(String text) throws javax.mail.MessagingException
setText
in interface javax.mail.internet.MimePart
setText
in interface javax.mail.Part
setText
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setText(java.lang.String)
public void setText(String text, String charset) throws javax.mail.MessagingException
setText
in interface javax.mail.internet.MimePart
setText
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.setText(java.lang.String,
java.lang.String)
public void setContent(javax.mail.Multipart mp) throws javax.mail.MessagingException
setContent
in interface javax.mail.Part
setContent
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setContent(javax.mail.Multipart)
public javax.mail.Message reply(boolean replyToAll) throws javax.mail.MessagingException
reply
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.reply(boolean)
public void setHeader(String name, String value) throws javax.mail.MessagingException
setHeader
in interface javax.mail.Part
setHeader
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.setHeader(java.lang.String, java.lang.String)
public void addHeader(String name, String value) throws javax.mail.MessagingException
addHeader
in interface javax.mail.Part
addHeader
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.addHeader(java.lang.String, java.lang.String)
public void removeHeader(String name) throws javax.mail.MessagingException
removeHeader
in interface javax.mail.Part
removeHeader
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Part.removeHeader(java.lang.String)
public void addHeaderLine(String line) throws javax.mail.MessagingException
addHeaderLine
in interface javax.mail.internet.MimePart
addHeaderLine
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimePart.addHeaderLine(java.lang.String)
public void setFlags(javax.mail.Flags flag, boolean set) throws javax.mail.MessagingException
setFlags
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.setFlags(javax.mail.Flags, boolean)
public void saveChanges() throws javax.mail.MessagingException
saveChanges
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
Message.saveChanges()
public void addRecipients(javax.mail.Message.RecipientType type, String addresses) throws javax.mail.MessagingException
addRecipients
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.addRecipients(javax.mail.Message.RecipientType,
java.lang.String)
public void setRecipients(javax.mail.Message.RecipientType type, String addresses) throws javax.mail.MessagingException
setRecipients
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.setRecipients(javax.mail.Message.RecipientType,
java.lang.String)
public void setSender(javax.mail.Address arg0) throws javax.mail.MessagingException
setSender
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
MimeMessage.setSender(javax.mail.Address)
public void addRecipient(javax.mail.internet.MimeMessage.RecipientType arg0, javax.mail.Address arg1) throws javax.mail.MessagingException
javax.mail.MessagingException
Message.addRecipient(javax.mail.Message.RecipientType,
javax.mail.Address)
public void setFlag(javax.mail.Flags.Flag arg0, boolean arg1) throws javax.mail.MessagingException
setFlag
in class javax.mail.Message
javax.mail.MessagingException
Message.setFlag(javax.mail.Flags.Flag, boolean)
public long getMessageSize() throws javax.mail.MessagingException
javax.mail.MessagingException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.