java.net.SocketPermission翻译(3)

2008-02-23 09:51:40来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折


an IPv6 literal address is also valid.
IPv6地址完整未压缩的文字形式也有效。
<p>
The port or portrange is optional. A port specification of the
form "N-", where <i>N</i> is a port number, signifies all ports
numbered <i>N</i> and above, while a specification of the
form "-N" indicates all ports numbered <i>N</i> and below.
端口和端口范围可选。“N-”形式的端口说明N是端口号,表示N和N以上大小的所有端口,
而“-N”形式的端口说明N是端口号,表示N和N以下大小的所有端口,
<p>
The possible ways to connect to the host are
连接到主机的可能方式有
<pre>
accept
connect
listen
resolve
</pre>
The "listen" action is only meaningful when used with "localhost".
The "resolve" action is implied when any of the other actions are present.
The action "resolve" refers to host/ip name service lookups.
“listen”只有同“localhost”一起使用才有意义。在给出任何其他动作时,resolve(解析主机名或IP命名服务查询)
都是默认的。
<p>As an example of the creation and meaning of SocketPermissions,
note that if the following permission:
举例给出SocketPermissions的创建和意思,注意如果以下许可
<pre>
p1 = new SocketPermission("puffin.eng.sun.com:7777", "connect,accept");
</pre>

is granted to some code, it allows that code to connect to port 7777 on
<code>puffin.eng.sun.com</code>, and to accept connections on that port.
被授权给某些代码,则允许代码连接puffin.eng.sun.com的端口7777,接收此端口的连接。
<p>Similarly, if the following permission:
同样,如果以下许可
<pre>
p1 = new SocketPermission("puffin.eng.sun.com:7777", "connect,accept");
p2 = new SocketPermission("localhost:1024-", "accept,connect,listen");
</pre>

is granted to some code, it allows that code to
accept connections on, connect to, or listen on any port between
1024 and 65535 on the local host.
被授权给某些代码,则允许代码接收连接、连接或者监听端口号在1024和65535之间的本地主机。
<p>Note: Granting code permission to accept or make connections to remote
hosts may be dangerous because malevolent code can then more easily
transfer and share confidential data among parties who may not
otherwise have access to the data.
注意:授权代码接收或发起到远端主机的连接可能有一定的威胁,因为恶意代码可能更容易地传输和分享两端之间原本不可访问的秘密数据。
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../java/security/Permissions.html" title="class in java.security"><CODE>Permissions</CODE></A>,
<A HREF="../../java/net/SocketPermission.html" title="class in java.net"><CODE>SocketPermission</CODE></A></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE=" 2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../java/net/SocketPermission.html#SocketPermission(java.lang.String, java.lang.String)">SocketPermission</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;host,
<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;action)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new SocketPermission object with the specified actions.
创建一个指定动作的SocketPermission。</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE=" 2">

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:[总结]看了treetable_例子1 后的小结

下一篇:我的J2ME作品-水浒笑传之林冲演义