public class PreencodedMimeBodyPart extends MimeBodyPart
setText
, setContent
, or
setDataHandler
methods.cachedContent, content, contentStream, dh, headers
ATTACHMENT, INLINE
Constructor and Description |
---|
PreencodedMimeBodyPart(String encoding)
Create a PreencodedMimeBodyPart that assumes the data is
encoded using the specified encoding.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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(String encoding)
encoding
- the Content-Transfer-Encodingpublic String getEncoding() throws MessagingException
getEncoding
in interface MimePart
getEncoding
in class MimeBodyPart
MessagingException
- for failuresMimeBodyPart.headers
public void writeTo(OutputStream os) throws IOException, MessagingException
writeTo
in interface Part
writeTo
in class MimeBodyPart
os
- the stream to write toIOException
- if an error occurs writing to the
stream or if an error is generated
by the javax.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 failuresCopyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.