⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mimebodypart.html

📁 j2ee的API 1.4版本,j2ee的帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>  <DD>JavaMail 1.3</DD></DL></DD></DL><HR><A NAME="getContentMD5()"><!-- --></A><H3>getContentMD5</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getContentMD5</B>()                     throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Return the value of the "Content-MD5" header field. Returns  <code>null</code> if this field is unavailable or its value is absent. <p> This implementation uses <code>getHeader(name)</code> to obtain the requisite header field.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getContentMD5()">getContentMD5</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet">MimePart</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>content-MD5<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="setContentMD5(java.lang.String)"><!-- --></A><H3>setContentMD5</H3><PRE>public void <B>setContentMD5</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;md5)                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Set the "Content-MD5" header field of this body part.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#setContentMD5(java.lang.String)">setContentMD5</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet">MimePart</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>md5</CODE> - the MD5 value<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying			implementation does not support modification<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this body part is			obtained from a READ_ONLY folder.<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="getContentLanguage()"><!-- --></A><H3>getContentLanguage</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getContentLanguage</B>()                            throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Get the languages specified in the Content-Language header of this MimePart. The Content-Language header is defined by RFC 1766. Returns <code>null</code> if this header is not available or its value is absent. <p> This implementation uses <code>getHeader(name)</code> to obtain the requisite header field.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getContentLanguage()">getContentLanguage</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet">MimePart</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="setContentLanguage(java.lang.String[])"><!-- --></A><H3>setContentLanguage</H3><PRE>public void <B>setContentLanguage</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;languages)                        throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Set the Content-Language header of this MimePart. The Content-Language header is defined by RFC 1766.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#setContentLanguage(java.lang.String[])">setContentLanguage</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet">MimePart</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>languages</CODE> - array of language tags<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="getDescription()"><!-- --></A><H3>getDescription</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getDescription</B>()                      throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Returns the "Content-Description" header field of this body part. This typically associates some descriptive information with  this part. Returns null if this field is unavailable or its value is absent. <p> If the Content-Description field is encoded as per RFC 2047, it is decoded and converted into Unicode. If the decoding or  conversion fails, the raw data is returned as is. <p> This implementation uses <code>getHeader(name)</code> to obtain the requisite header field.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Part.html#getDescription()">getDescription</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>content description<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="setDescription(java.lang.String)"><!-- --></A><H3>setDescription</H3><PRE>public void <B>setDescription</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;description)                    throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Set the "Content-Description" header field for this body part. If the description parameter is <code>null</code>, then any  existing "Content-Description" fields are removed. <p> If the description contains non US-ASCII characters, it will  be encoded using the platform's default charset. If the  description contains only US-ASCII characters, no encoding  is done and it is used as is. <p> Note that if the charset encoding process fails, a MessagingException is thrown, and an UnsupportedEncodingException is included in the chain of nested exceptions within the MessagingException.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Part.html#setDescription(java.lang.String)">setDescription</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>description</CODE> - content description<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying			implementation does not support modification<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this body part is			obtained from a READ_ONLY folder.<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - otherwise; an                  UnsupportedEncodingException may be included                  in the exception chain if the charset                  conversion fails.</DL></DD></DL><HR><A NAME="setDescription(java.lang.String, java.lang.String)"><!-- --></A><H3>setDescription</H3><PRE>public void <B>setDescription</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;description,                           <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;charset)                    throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Set the "Content-Description" header field for this body part. If the description parameter is <code>null</code>, then any  existing "Content-Description" fields are removed. <p> If the description contains non US-ASCII characters, it will  be encoded using the specified charset. If the description  contains only US-ASCII characters, no encoding  is done and  it is used as is. <p> Note that if the charset encoding process fails, a MessagingException is thrown, and an UnsupportedEncodingException is included in the chain of nested exceptions within the MessagingException.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>description</CODE> - Description<DD><CODE>charset</CODE> - Charset for encoding<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying			implementation does not support modification<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this body part is			obtained from a READ_ONLY folder.<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - otherwise; an                  UnsupportedEncodingException may be included                  in the exception chain if the charset                  conversion fails.</DL></DD></DL><HR><A NAME="getFileName()"><!-- --></A><H3>getFileName</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getFileName</B>()                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Get the filename associated with this body part. <p> Returns the value of the "filename" parameter from the "Content-Disposition" header field of this body part. If its not available, returns the value of the "name" parameter from the "Content-Type" header field of this body part. Returns <code>null</code> if both are absent.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Part.html#getFileName()">getFileName</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>filename<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="setFileName(java.lang.String)"><!-- --></A><H3>setFileName</H3><PRE>public void <B>setFileName</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;filename)                 throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Set the filename associated with this body part, if possible. <p> Sets the "filename" parameter of the "Content-Disposition" header field of this body part.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Part.html#setFileName(java.lang.String)">setFileName</A></CODE> in interf

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -