javax.mail.internet
Class PreencodedMimeBodyPart

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

public class PreencodedMimeBodyPart
extends MimeBodyPart

Version:
$Rev: 421852 $ $Date: 2006-07-14 03:02:19 -0700 (Fri, 14 Jul 2006) $

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 new body part with the specified MIME transfer encoding.
 
Method Summary
 String getEncoding()
          Retieve the defined encoding for this body part.
protected  void updateHeaders()
          Override of update headers to ensure the transfer encoding is forced to the correct type.
 void writeTo(OutputStream out)
          Write the body part content to the stream without applying and additional encodings.
 
Methods inherited from class javax.mail.internet.MimeBodyPart
addHeader, addHeaderLine, attachFile, attachFile, getAllHeaderLines, getAllHeaders, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, 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
 
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

PreencodedMimeBodyPart

public PreencodedMimeBodyPart(String encoding)
Create a new body part with the specified MIME transfer encoding.

Parameters:
encoding - The content encoding.
Method Detail

getEncoding

public String getEncoding()
                   throws MessagingException
Retieve the defined encoding for this body part.

Specified by:
getEncoding in interface MimePart
Overrides:
getEncoding in class MimeBodyPart
Returns:
Throws:
MessagingException

writeTo

public void writeTo(OutputStream out)
             throws IOException,
                    MessagingException
Write the body part content to the stream without applying and additional encodings.

Specified by:
writeTo in interface Part
Overrides:
writeTo in class MimeBodyPart
Parameters:
out - The target output stream.
Throws:
IOException
MessagingException

updateHeaders

protected void updateHeaders()
                      throws MessagingException
Override of update headers to ensure the transfer encoding is forced to the correct type.

Overrides:
updateHeaders in class MimeBodyPart
Throws:
MessagingException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.