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

📄 internetaddress.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</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 string of addresses<DT><B>Throws:</B><DD><CODE>ClassCastException,</CODE> - if any address object in the 			given array is not an InternetAddress object. 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" title="class in javax.mail.internet">InternetAddress</A> <B>getLocalAddress</B>(<A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session</A>&nbsp;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.<P><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" title="class in javax.mail.internet">InternetAddress</A>[] <B>parse</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;addresslist)                               throws <A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></PRE><DL><DD>Parse the given comma separated sequence of addresses into InternetAddress objects.  Addresses must follow RFC822 syntax.<P><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" title="class in javax.mail.internet">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" title="class in javax.mail.internet">InternetAddress</A>[] <B>parse</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;addresslist,                                      boolean&nbsp;strict)                               throws <A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">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.<P><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" title="class in javax.mail.internet">AddressException</A></CODE> - if the parse failed</DL></DD></DL><HR><A NAME="parseHeader(java.lang.String, boolean)"><!-- --></A><H3>parseHeader</H3><PRE>public static <A HREF="../../../javax/mail/internet/InternetAddress.html" title="class in javax.mail.internet">InternetAddress</A>[] <B>parseHeader</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;addresslist,                                            boolean&nbsp;strict)                                     throws <A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></PRE><DL><DD>Parse the given sequence of addresses into InternetAddress objects.  If <code>strict</code> is false, the full syntax rules for individual addresses are not enforced.  If <code>strict</code> is true, many (but not all) of the RFC822 syntax rules are enforced. <p> To better support the range of "invalid" addresses seen in real messages, this method enforces fewer syntax rules than the <code>parse</code> method when the strict flag is false and enforces more rules when the strict flag is true.  If the strict flag is false and the parse is successful in separating out an email address or addresses, the syntax of the addresses themselves is not checked.<P><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" title="class in javax.mail.internet">AddressException</A></CODE> - if the parse failed<DT><B>Since:</B></DT>  <DD>JavaMail 1.3</DD></DL></DD></DL><HR><A NAME="validate()"><!-- --></A><H3>validate</H3><PRE>public void <B>validate</B>()              throws <A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></PRE><DL><DD>Validate that this address conforms to the syntax rules of RFC 822.  The current implementation checks many, but not all, syntax rules.  Note that even though the syntax of the address may be correct, there's no guarantee that a mailbox of that name exists.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></CODE> - if the address isn't valid.<DT><B>Since:</B></DT>  <DD>JavaMail 1.3</DD></DL></DD></DL><HR><A NAME="isGroup()"><!-- --></A><H3>isGroup</H3><PRE>public boolean <B>isGroup</B>()</PRE><DL><DD>Indicates whether this address is an RFC 822 group address. Note that a group address is different than the mailing list addresses supported by most mail servers.  Group addresses are rarely used; see RFC 822 for details.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if this address represents a group<DT><B>Since:</B></DT>  <DD>JavaMail 1.3</DD></DL></DD></DL><HR><A NAME="getGroup(boolean)"><!-- --></A><H3>getGroup</H3><PRE>public <A HREF="../../../javax/mail/internet/InternetAddress.html" title="class in javax.mail.internet">InternetAddress</A>[] <B>getGroup</B>(boolean&nbsp;strict)                           throws <A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></PRE><DL><DD>Return the members of a group address.  A group may have zero, one, or more members.  If this address is not a group, null is returned.  The <code>strict</code> parameter controls whether the group list is parsed using strict RFC 822 rules or not. The parsing is done using the <code>parseHeader</code> method.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>array of InternetAddress objects, or null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></CODE> - if the group list can't be parsed<DT><B>Since:</B></DT>  <DD>JavaMail 1.3</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/mail/internet/HeaderTokenizer.Token.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet"><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>  &nbsp;&nbsp;<A HREF="InternetAddress.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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