public class PreencodedMimeBodyPart extends MimeBodyPart
setText
, setContent
, or
setDataHandler
methods.cachedContent, content, contentStream, dh, headers
parent, streamProvider
ATTACHMENT, INLINE
Constructor and Description |
---|
PreencodedMimeBodyPart(java.lang.String encoding)
Create a PreencodedMimeBodyPart that assumes the data is
encoded using the specified encoding.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addHeader, addHeaderLine, attachFile, attachFile, 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
public PreencodedMimeBodyPart(java.lang.String encoding)
encoding
- the Content-Transfer-Encodingpublic java.lang.String getEncoding() throws MessagingException
getEncoding
in interface MimePart
getEncoding
in class MimeBodyPart
MessagingException
- for failuresMimeBodyPart.headers
public void writeTo(java.io.OutputStream os) throws java.io.IOException, MessagingException
writeTo
in interface Part
writeTo
in class MimeBodyPart
os
- the stream to write tojava.io.IOException
- if an error occurs writing to the
stream or if an error is generated
by the jakarta.activation layer.MessagingException
- for other failuresDataHandler.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
- for failures