| java.lang.Object javax.mail.BodyPart javax.mail.internet.MimeBodyPart javax.mail.internet.PreencodedMimeBodyPart
PreencodedMimeBodyPart | public class PreencodedMimeBodyPart extends MimeBodyPart (Code) | | 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.
since: JavaMail 1.4 |
Constructor Summary | |
public | PreencodedMimeBodyPart(String encoding) Create a PreencodedMimeBodyPart that assumes the data is
encoded using the specified encoding. |
Method Summary | |
public 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. | public void | writeTo(OutputStream os) Output the body part as an RFC 822 format stream. |
PreencodedMimeBodyPart | public PreencodedMimeBodyPart(String encoding)(Code) | | Create a PreencodedMimeBodyPart that assumes the data is
encoded using the specified encoding. The encoding must
be a MIME supported Content-Transfer-Encoding.
|
updateHeaders | protected void updateHeaders() throws MessagingException(Code) | | Force the Content-Transfer-Encoding header to use
the encoding that was specified when this object was created.
|
Methods inherited from javax.mail.internet.MimeBodyPart | public void addHeader(String name, String value) throws MessagingException(Code)(Java Doc) public void addHeaderLine(String line) throws MessagingException(Code)(Java Doc) public void attachFile(File file) throws IOException, MessagingException(Code)(Java Doc) public void attachFile(String file) throws IOException, MessagingException(Code)(Java Doc) public Enumeration getAllHeaderLines() throws MessagingException(Code)(Java Doc) public Enumeration getAllHeaders() throws MessagingException(Code)(Java Doc) public Object getContent() throws IOException, MessagingException(Code)(Java Doc) public String getContentID() throws MessagingException(Code)(Java Doc) public String[] getContentLanguage() throws MessagingException(Code)(Java Doc) static String[] getContentLanguage(MimePart part) throws MessagingException(Code)(Java Doc) public String getContentMD5() throws MessagingException(Code)(Java Doc) protected InputStream getContentStream() throws MessagingException(Code)(Java Doc) public String getContentType() throws MessagingException(Code)(Java Doc) public DataHandler getDataHandler() throws MessagingException(Code)(Java Doc) public String getDescription() throws MessagingException(Code)(Java Doc) static String getDescription(MimePart part) throws MessagingException(Code)(Java Doc) public String getDisposition() throws MessagingException(Code)(Java Doc) static String getDisposition(MimePart part) throws MessagingException(Code)(Java Doc) public String getEncoding() throws MessagingException(Code)(Java Doc) static String getEncoding(MimePart part) throws MessagingException(Code)(Java Doc) public String getFileName() throws MessagingException(Code)(Java Doc) static String getFileName(MimePart part) throws MessagingException(Code)(Java Doc) public String[] getHeader(String name) throws MessagingException(Code)(Java Doc) public String getHeader(String name, String delimiter) throws MessagingException(Code)(Java Doc) public InputStream getInputStream() throws IOException, MessagingException(Code)(Java Doc) public int getLineCount() throws MessagingException(Code)(Java Doc) public Enumeration getMatchingHeaderLines(String[] names) throws MessagingException(Code)(Java Doc) public Enumeration getMatchingHeaders(String[] names) throws MessagingException(Code)(Java Doc) public Enumeration getNonMatchingHeaderLines(String[] names) throws MessagingException(Code)(Java Doc) public Enumeration getNonMatchingHeaders(String[] names) throws MessagingException(Code)(Java Doc) public InputStream getRawInputStream() throws MessagingException(Code)(Java Doc) public int getSize() throws MessagingException(Code)(Java Doc) static void invalidateContentHeaders(MimePart part) throws MessagingException(Code)(Java Doc) public boolean isMimeType(String mimeType) throws MessagingException(Code)(Java Doc) static boolean isMimeType(MimePart part, String mimeType) throws MessagingException(Code)(Java Doc) public void removeHeader(String name) throws MessagingException(Code)(Java Doc) public void saveFile(File file) throws IOException, MessagingException(Code)(Java Doc) public void saveFile(String file) throws IOException, MessagingException(Code)(Java Doc) public void setContent(Object o, String type) throws MessagingException(Code)(Java Doc) public void setContent(Multipart mp) throws MessagingException(Code)(Java Doc) public void setContentID(String cid) throws MessagingException(Code)(Java Doc) public void setContentLanguage(String[] languages) throws MessagingException(Code)(Java Doc) static void setContentLanguage(MimePart part, String[] languages) throws MessagingException(Code)(Java Doc) public void setContentMD5(String md5) throws MessagingException(Code)(Java Doc) public void setDataHandler(DataHandler dh) throws MessagingException(Code)(Java Doc) public void setDescription(String description) throws MessagingException(Code)(Java Doc) public void setDescription(String description, String charset) throws MessagingException(Code)(Java Doc) static void setDescription(MimePart part, String description, String charset) throws MessagingException(Code)(Java Doc) public void setDisposition(String disposition) throws MessagingException(Code)(Java Doc) static void setDisposition(MimePart part, String disposition) throws MessagingException(Code)(Java Doc) static void setEncoding(MimePart part, String encoding) throws MessagingException(Code)(Java Doc) public void setFileName(String filename) throws MessagingException(Code)(Java Doc) static void setFileName(MimePart part, String name) throws MessagingException(Code)(Java Doc) public void setHeader(String name, String value) throws MessagingException(Code)(Java Doc) public void setText(String text) throws MessagingException(Code)(Java Doc) public void setText(String text, String charset) throws MessagingException(Code)(Java Doc) public void setText(String text, String charset, String subtype) throws MessagingException(Code)(Java Doc) static void setText(MimePart part, String text, String charset, String subtype) throws MessagingException(Code)(Java Doc) protected void updateHeaders() throws MessagingException(Code)(Java Doc) static void updateHeaders(MimePart part) throws MessagingException(Code)(Java Doc) public void writeTo(OutputStream os) throws IOException, MessagingException(Code)(Java Doc) static void writeTo(MimePart part, OutputStream os, String[] ignoreList) throws IOException, MessagingException(Code)(Java Doc)
|
|
|