internetaddress.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 748 行 · 第 1/3 页
HTML
748 行
fails.<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/InternetAddress.html#setPersonal(java.lang.String, java.lang.String)"><CODE>setPersonal(String name, String charset)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getAddress()"><!-- --></A><H3>
getAddress</H3>
<PRE>
public java.lang.String <B>getAddress</B>()</PRE>
<DL>
<DD>Get the email address.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>email address</DL>
</DD>
</DL>
<HR>
<A NAME="getPersonal()"><!-- --></A><H3>
getPersonal</H3>
<PRE>
public java.lang.String <B>getPersonal</B>()</PRE>
<DL>
<DD>Get the personal name. If the name is encoded as per RFC 2047,
it is decoded and converted into Unicode. If the decoding or
convertion fails, the raw data is returned as is.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>personal name</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Convert this address into a RFC 822 / RFC 2047 encoded address.
The resulting string contains only US-ASCII characters, and
hence is mail-safe.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Address.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../../javax/mail/Address.html">Address</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>possibly encoded address string</DL>
</DD>
</DL>
<HR>
<A NAME="toUnicodeString()"><!-- --></A><H3>
toUnicodeString</H3>
<PRE>
public java.lang.String <B>toUnicodeString</B>()</PRE>
<DL>
<DD>Returns a properly formatted address (RFC 822 syntax) of
Unicode characters.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Unicode address string<DT><B>Since: </B><DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(java.lang.Object a)</PRE>
<DL>
<DD>The equality operator.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Address.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../javax/mail/Address.html">Address</A></CODE></DL>
</DD>
<DD>Following copied from class: <CODE>javax.mail.Address</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>address</CODE> - Address object</DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>Compute a hash code for the address.<DD><DL>
<DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="toString(javax.mail.Address[])"><!-- --></A><H3>
toString</H3>
<PRE>
public static java.lang.String <B>toString</B>(<A HREF="../../../javax/mail/Address.html">Address</A>[] addresses)</PRE>
<DL>
<DD>Convert the given array of InternetAddress objects into
a comma separated sequence of address strings. The
resulting string contains only US-ASCII characters, and
hence is mail-safe. <p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>addresses</CODE> - array of InternetAddress objects<DT><B>Returns:</B><DD>comma separated address strings<DT><B>Throws:</B><DD><CODE>ClassCastException,</CODE> - if any address object in the
given array is not an InternetAddress objects. Note
that this is a RuntimeException.</DL>
</DD>
</DL>
<HR>
<A NAME="toString(javax.mail.Address[], int)"><!-- --></A><H3>
toString</H3>
<PRE>
public static java.lang.String <B>toString</B>(<A HREF="../../../javax/mail/Address.html">Address</A>[] addresses,
int used)</PRE>
<DL>
<DD>Convert the given array of InternetAddress objects into
a comma separated sequence of address strings. The
resulting string contains only US-ASCII characters, and
hence is mail-safe. <p>
The 'used' parameter specifies the number of character positions
already taken up in the field into which the resulting address
sequence string is to be inserted. Its used to determine the
line-break positions in the resulting address sequence string.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>addresses</CODE> - array of InternetAddress objects<DD><CODE>used</CODE> - number of character positions already used, in
the field into which the address string is to
be inserted.<DT><B>Returns:</B><DD>comma separated address strings<DT><B>Throws:</B><DD><CODE>ClassCastException,</CODE> - if any address object in the
given array is not an InternetAddress objects. Note
that this is a RuntimeException.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalAddress(javax.mail.Session)"><!-- --></A><H3>
getLocalAddress</H3>
<PRE>
public static <A HREF="../../../javax/mail/internet/InternetAddress.html">InternetAddress</A> <B>getLocalAddress</B>(<A HREF="../../../javax/mail/Session.html">Session</A> session)</PRE>
<DL>
<DD>Return an InternetAddress object representing the current user.
The entire email address may be specified in the "mail.from"
property. If not set, the "mail.user" and "mail.host" properties
are tried. If those are not set, the "user.name" property and
<code>InetAddress.getLocalHost</code> method are tried.
Security exceptions that may occur while accessing this information
are ignored. If it is not possible to determine an email address,
null is returned.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - Session object used for property lookup<DT><B>Returns:</B><DD>current user's email address</DL>
</DD>
</DL>
<HR>
<A NAME="parse(java.lang.String)"><!-- --></A><H3>
parse</H3>
<PRE>
public static <A HREF="../../../javax/mail/internet/InternetAddress.html">InternetAddress</A>[] <B>parse</B>(java.lang.String addresslist)
throws <A HREF="../../../javax/mail/internet/AddressException.html">AddressException</A></PRE>
<DL>
<DD>Parse the given comma separated sequence of addresses into
InternetAddress objects. Addresses must follow RFC822 syntax.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>addresslist</CODE> - comma separated address strings<DT><B>Returns:</B><DD>array of InternetAddress objects<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html">AddressException</A></CODE> - if the parse failed</DL>
</DD>
</DL>
<HR>
<A NAME="parse(java.lang.String, boolean)"><!-- --></A><H3>
parse</H3>
<PRE>
public static <A HREF="../../../javax/mail/internet/InternetAddress.html">InternetAddress</A>[] <B>parse</B>(java.lang.String s,
boolean strict)
throws <A HREF="../../../javax/mail/internet/AddressException.html">AddressException</A></PRE>
<DL>
<DD>Parse the given sequence of addresses into InternetAddress
objects. If <code>strict</code> is false, simple email addresses
separated by spaces are also allowed. If <code>strict</code> is
true, many (but not all) of the RFC822 syntax rules are enforced.
In particular, even if <code>strict</code> is true, addresses
composed of simple names (with no "@domain" part) are allowed.
Such "illegal" addresses are not uncommon in real messages. <p>
Non-strict parsing is typically used when parsing a list of
mail addresses entered by a human. Strict parsing is typically
used when parsing address headers in mail messages.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>addresslist</CODE> - comma separated address strings<DD><CODE>strict</CODE> - enforce RFC822 syntax<DT><B>Returns:</B><DD>array of InternetAddress objects<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html">AddressException</A></CODE> - if the parse failed</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" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="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" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/mail/internet/HeaderTokenizer.Token.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/mail/internet/InternetHeaders.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="InternetAddress.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?