mimepart.html
来自「SUN的JAVA MAIL API」· HTML 代码 · 共 520 行 · 第 1/2 页
HTML
520 行
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
getHeader</H3>
<PRE>
public java.lang.String <B>getHeader</B>(java.lang.String header_name,
java.lang.String delimiter)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the values of all header fields available for this header,
returned as a single String, with the values separated by the
delimiter. If the delimiter is <code>null</code>, only the
first value is returned.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>header_name</CODE> - the name of this header<DT><B>Returns:</B><DD>the value fields for all headers with
this name<DT><B>Throws:</B><DD><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A> - </DL>
</DD>
</DL>
<HR>
<A NAME="addHeaderLine(java.lang.String)"><!-- --></A><H3>
addHeaderLine</H3>
<PRE>
public void <B>addHeaderLine</B>(java.lang.String line)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Add a raw RFC822 header-line.<DD><DL>
<DT><B>Throws:</B><DD><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying
implementation does not support modification<DD>IllegalStateException - if this Part is
obtained from a READ_ONLY folder</DL>
</DD>
</DL>
<HR>
<A NAME="getAllHeaderLines()"><!-- --></A><H3>
getAllHeaderLines</H3>
<PRE>
public java.util.Enumeration <B>getAllHeaderLines</B>()
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get all header lines as an Enumeration of Strings. A Header
line is a raw RFC822 header-line, containing both the "name"
and "value" field.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
getMatchingHeaderLines</H3>
<PRE>
public java.util.Enumeration <B>getMatchingHeaderLines</B>(java.lang.String[] names)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get matching header lines as an Enumeration of Strings.
A Header line is a raw RFC822 header-line, containing both
the "name" and "value" field.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getNonMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
getNonMatchingHeaderLines</H3>
<PRE>
public java.util.Enumeration <B>getNonMatchingHeaderLines</B>(java.lang.String[] names)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get non-matching header lines as an Enumeration of Strings.
A Header line is a raw RFC822 header-line, containing both
the "name" and "value" field.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getEncoding()"><!-- --></A><H3>
getEncoding</H3>
<PRE>
public java.lang.String <B>getEncoding</B>()
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the transfer encoding of this part.<DD><DL>
<DT><B>Returns:</B><DD>content-transfer-encoding<DT><B>Throws:</B><DD><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A> - </DL>
</DD>
</DL>
<HR>
<A NAME="getContentID()"><!-- --></A><H3>
getContentID</H3>
<PRE>
public java.lang.String <B>getContentID</B>()
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the Content-ID of this part. Returns null if none present.<DD><DL>
<DT><B>Returns:</B><DD>content-ID</DL>
</DD>
</DL>
<HR>
<A NAME="getContentMD5()"><!-- --></A><H3>
getContentMD5</H3>
<PRE>
public java.lang.String <B>getContentMD5</B>()
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the Content-MD5 digest of this part. Returns null if
none present.<DD><DL>
<DT><B>Returns:</B><DD>content-MD5</DL>
</DD>
</DL>
<HR>
<A NAME="setContentMD5(java.lang.String)"><!-- --></A><H3>
setContentMD5</H3>
<PRE>
public void <B>setContentMD5</B>(java.lang.String md5)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the Content-MD5 of this part.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cid</CODE> - content-id<DT><B>Throws:</B><DD><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying
implementation does not support modification<DD>IllegalStateException - if this Part is
obtained from a READ_ONLY folder</DL>
</DD>
</DL>
<HR>
<A NAME="getContentLanguage()"><!-- --></A><H3>
getContentLanguage</H3>
<PRE>
public java.lang.String[] <B>getContentLanguage</B>()
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the language tags 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.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setContentLanguage(java.lang.String[])"><!-- --></A><H3>
setContentLanguage</H3>
<PRE>
public void <B>setContentLanguage</B>(java.lang.String[] languages)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the Content-Language header of this MimePart. The
Content-Language header is defined by RFC1766.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>languages</CODE> - array of language tags<DT><B>Throws:</B><DD><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying
implementation does not support modification<DD>IllegalStateException - if this Part is
obtained from a READ_ONLY folder</DL>
</DD>
</DL>
<HR>
<A NAME="setText(java.lang.String)"><!-- --></A><H3>
setText</H3>
<PRE>
public void <B>setText</B>(java.lang.String text)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Convenience method that sets the given String as this
part's content, with a MIME type of "text/plain". If the
string contains non US-ASCII characters. it will be encoded
using the platform's default charset. The charset is also
used to set the "charset" parameter. <p>
Note that there may be a performance penalty if
<code>text</code> is large, since this method may have
to scan all the characters to determine what charset to
use. <p>
If the charset is already known, use the
setText() version that takes the charset parameter.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/mail/Part.html#setText(java.lang.String)">setText</A> in interface <A HREF="../../../javax/mail/Part.html">Part</A><DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimePart.html#setText(java.lang.String, java.lang.String)"><CODE>setText(String text, String charset)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setText(java.lang.String, java.lang.String)"><!-- --></A><H3>
setText</H3>
<PRE>
public void <B>setText</B>(java.lang.String text,
java.lang.String charset)
throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Convenience method that sets the given String as this part's
content, with a MIME type of "text/plain" and the specified
charset. The given Unicode string will be charset-encoded
using the specified charset. The charset is also used to set
"charset" parameter.<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="class-use/MimePart.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="MimePart.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?