This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.mail.internet
class PreencodedMimeBodyPart

javax.mail.BodyPart extended by javax.mail.internet.MimeBodyPart extended by javax.mail.internet.PreencodedMimeBodyPart
All Implemented Interfaces:
Part, MimePart

public class PreencodedMimeBodyPart
extends MimeBodyPart

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
 
Constructor Summary

          Create a PreencodedMimeBodyPart that assumes the data is encoded using the specified encoding.
 
Method Summary
 String

          Returns the content transfer encoding specified when this object was created.
protected void

          Force the Content-Transfer-Encoding header to use the encoding that was specified when this object was created.
 void

          Output the body part as an RFC 822 format stream.
 
Methods inherited from class javax.mail.internet.MimeBodyPart
addHeader, addHeaderLine, attachFile, attachFile, getAllHeaderLines, getAllHeaders, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getSize, isMimeType, removeHeader, saveFile, saveFile, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setHeader, setText, setText, setText, updateHeaders, writeTo
 
Methods inherited from class javax.mail.BodyPart
getParent
 

Constructor Detail

PreencodedMimeBodyPart

public PreencodedMimeBodyPart(String encoding)
Create a PreencodedMimeBodyPart that assumes the data is encoded using the specified encoding. The encoding must be a MIME supported Content-Transfer-Encoding.

Parameters:
encoding
Method Detail

getEncoding

public String getEncoding()
                   throws MessagingException
Returns the content transfer encoding specified when this object was created.

Overrides:
getEncoding in class MimeBodyPart
Throws:
MessagingException

updateHeaders

protected void updateHeaders()
                      throws MessagingException
Force the Content-Transfer-Encoding header to use the encoding that was specified when this object was created.

Overrides:
updateHeaders in class MimeBodyPart
Throws:
MessagingException

writeTo

public void writeTo(OutputStream os)
             throws IOException,
                    MessagingException
Output the body part as an RFC 822 format stream.

Overrides:
writeTo in class MimeBodyPart
Parameters:
os
Throws:
IOException - if an error occurs writing to the stream or if an error is generated by the javax.activation layer.
MessagingException


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention. The official Sun™ documentation can be found here at http://java.sun.com/products/javamail/javadocs/index.html.