java.net.SocketPermission翻译(5)
2008-02-23 09:51:40来源:互联网 阅读 ()
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE=" 2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SocketPermission(java.lang.String, java.lang.String)"><!-- --></A><H3>
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
SocketPermission</H3>
<PRE>
public <B>SocketPermission</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A> host,
<A HREF="../../java/lang/String.html" title="class in java.lang">String</A> action)</PRE>
<DL>
<DD>Creates a new SocketPermission object with the specified actions.
The host is expressed as a DNS name, or as a numerical IP address.
Optionally, a port or a portrange may be supplied (separated
from the DNS name or IP address by a colon).
创建一个指定动作的SocketPermission。主机被表示为一个DNS名称,一个数字的IP地址。还可以提供一个端口或端口范围(用
冒号将DNS名称或IP地址分开)。
<p>
To specify the local machine, use "localhost" as the <i>host</i>.
Also note: An empty <i>host</i> String ("") is equivalent to "localhost".
要指定本地机器,可以使用“localhost”作为host参数。同时空的host字符串“”也等同于“localhost”。
<p>
The <i>actions</i> parameter contains a comma-separated list of the
actions granted for the specified host (and port(s)). Possible actions are
"connect", "listen", "accept", "resolve", or
any combination of those. "resolve" is automatically added
when any of the other three are specified.
actions参数包括一个以逗号分隔的动作列表,授权给指定的主机(和端口)。可能的动作包括:connect、listen、
accept、resolve或者它们之间的组合。当指定其他三种动作时,resolve是自动添加的。
<p>
Examples of SocketPermission instantiation are the following:
SocketPermission实例化的例子如下:
<pre>
nr = new SocketPermission("www.catalog.com", "connect");
nr = new SocketPermission("www.sun.com:80", "connect");
nr = new SocketPermission("*.sun.com", "connect");
nr = new SocketPermission("*.edu", "resolve");
nr = new SocketPermission("204.160.241.0", "connect");
nr = new SocketPermission("localhost:1024-65535", "listen");
nr = new SocketPermission("204.160.241.0:1024-65535", "connect");
</pre>
<P>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the hostname or IPaddress of the computer, optionally
including a colon followed by a port or port range. 主机名或计算机的IP地址,也可以包括冒号,后加上端口或端口范围。<DD><CODE>action</CODE> - the action string.
动作字符串。
</DL>
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash
