|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object extended by javax.mail.BodyPart extended by javax.mail.internet.MimeBodyPart extended by javax.mail.internet.PreencodedMimeBodyPart
public class PreencodedMimeBodyPart
A MimeBodyPart that handles data that has already been encoded.
This class is useful when constructing a message and attaching
data that has already been encoded (for example, using base64
encoding). The data may have been encoded by the application,
or may have been stored in a file or database in encoded form.
The encoding is supplied when this object is created. The data
is attached to this object in the usual fashion, by using the
setText
, setContent
, or
setDataHandler
methods.
Field Summary |
---|
Fields inherited from class javax.mail.internet.MimeBodyPart |
---|
content, contentStream, dh, headers |
Fields inherited from class javax.mail.BodyPart |
---|
parent |
Fields inherited from interface javax.mail.Part |
---|
ATTACHMENT, INLINE |
Constructor Summary | |
---|---|
PreencodedMimeBodyPart(String encoding)
Create a PreencodedMimeBodyPart that assumes the data is encoded using the specified encoding. |
Method Summary | |
---|---|
String |
getEncoding()
Returns the content transfer encoding specified when this object was created. |
protected void |
updateHeaders()
Force the Content-Transfer-Encoding header to use
the encoding that was specified when this object was created. |
void |
writeTo(OutputStream os)
Output the body part as an RFC 822 format stream. |
Methods inherited from class javax.mail.BodyPart |
---|
getParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PreencodedMimeBodyPart(String encoding)
Method Detail |
---|
public String getEncoding() throws MessagingException
getEncoding
in interface MimePart
getEncoding
in class MimeBodyPart
MessagingException
MimeBodyPart.headers
public void writeTo(OutputStream os) throws IOException, MessagingException
writeTo
in interface Part
writeTo
in class MimeBodyPart
MessagingException
IOException
- if an error occurs writing to the
stream or if an error is generated
by the javax.activation layer.DataHandler.writeTo(java.io.OutputStream)
protected void updateHeaders() throws MessagingException
Content-Transfer-Encoding
header to use
the encoding that was specified when this object was created.
updateHeaders
in class MimeBodyPart
MessagingException
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
Scripting on this page tracks web page traffic, but does not change the content in any way.