Spec-Zone .ru
спецификации, руководства, описания, API
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.BodyPart javax.mail.internet.MimeBodyPart 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(java.lang.String encoding)
Create a PreencodedMimeBodyPart that assumes the data is encoded using the specified encoding. |
Method Summary | |
---|---|
java.lang.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(java.io.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(java.lang.String encoding)
Method Detail |
---|
public java.lang.String getEncoding() throws MessagingException
getEncoding
in interface MimePart
getEncoding
in class MimeBodyPart
MessagingException
MimeBodyPart.headers
public void writeTo(java.io.OutputStream os) throws java.io.IOException, MessagingException
writeTo
in interface Part
writeTo
in class MimeBodyPart
MessagingException
java.io.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to
Generated on 10-February-2011 12:41