📄 mimebodypart.html
字号:
getEncoding</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getEncoding</B>() throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Returns the content transfer encoding from the "Content-Transfer-Encoding" header field. Returns <code>null</code> if the header 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#getEncoding()">getEncoding</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-transfer-encoding<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeBodyPart.html#headers"><CODE>headers</CODE></A></DL></DD></DL><HR><A NAME="getContentID()"><!-- --></A><H3>getContentID</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getContentID</B>() throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Returns the value of the "Content-ID" header field. Returns <code>null</code> if the 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#getContentID()">getContentID</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-ID<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="setContentID(java.lang.String)"><!-- --></A><H3>setContentID</H3><PRE>public void <B>setContentID</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> cid) throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Set the "Content-ID" header field of this body part. If the <code>cid</code> parameter is null, any existing "Content-ID" is removed.<P><DD><DL></DL></DD><DD><DL><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.5/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><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.5/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.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> 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.5/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.5/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.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] 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/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying implementation does not support modification<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.5/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.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> 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.5/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(ja
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -