亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? socketpermission.java

?? linux下的gcc編譯器
?? JAVA
字號:
/* SocketPermission.java -- Class modeling permissions for socket operations   Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version. */package java.net;import java.io.Serializable;import java.security.Permission;import java.security.PermissionCollection;/** * This class models a specific set of permssions for connecting to a * host.  There are two elements to this, the host/port combination and * the permission list. * <p> * The host/port combination is specified as followed * <p> * <pre> * hostname[:[-]port[-[port]]] * </pre> * <p> * The hostname portion can be either a hostname or IP address.  If it is * a hostname, a wildcard is allowed in hostnames.  This wildcard is a "*" * and matches one or more characters.  Only one "*" may appear in the * host and it must be the leftmost character.  For example, * "*.urbanophile.com" matches all hosts in the "urbanophile.com" domain. * <p> * The port portion can be either a single value, or a range of values * treated as inclusive.  The first or the last port value in the range * can be omitted in which case either the minimum or maximum legal * value for a port (respectively) is used by default.  Here are some * examples: * <p><ul> * <li>8080 - Represents port 8080 only * <li>2000-3000 - Represents ports 2000 through 3000 inclusive * <li>-4000 - Represents ports 0 through 4000 inclusive * <li>1024- - Represents ports 1024 through 65535 inclusive * </ul><p> * The permission list is a comma separated list of individual permissions. * These individual permissions are: * <p> * accept<br> * connect<br> * listen<br> * resolve<br> * <p> * The "listen" permission is only relevant if the host is localhost.  If * any permission at all is specified, then resolve permission is implied to * exist. * <p> * Here are a variety of examples of how to create SocketPermission's * <p><pre> * SocketPermission("www.urbanophile.com", "connect"); *   Can connect to any port on www.urbanophile.com * SocketPermission("www.urbanophile.com:80", "connect,accept"); *   Can connect to or accept connections from www.urbanophile.com on port 80 * SocketPermission("localhost:1024-", "listen,accept,connect"); *   Can connect to, accept from, an listen on any local port number 1024 *   and up. * SocketPermission("*.edu", "connect"); *   Can connect to any host in the edu domain * SocketPermission("197.197.20.1", "accept"); *   Can accept connections from 197.197.20.1 * </pre><p> * * @since 1.2 * * @author Aaron M. Renn (arenn@urbanophile.com) */public final class SocketPermission extends Permission  implements Serializable{  static final long serialVersionUID = -7204263841984476862L;// FIXME: Needs serialization work, including readObject/writeObject methods.  /**   * A hostname/port combination as described above   */  private transient String hostport;  /**   * A comma separated list of actions for which we have permission   */  private String actions;  /**   * Initializes a new instance of <code>SocketPermission</code> with the    * specified host/port combination and actions string.   *   * @param hostport The hostname/port number combination   * @param actions The actions string   */  public SocketPermission(String hostport, String actions)  {    super(hostport);    this.hostport = hostport;    this.actions = actions;  }  /**   * Tests this object for equality against another.  This will be true if   * and only if the passed object is an instance of    * <code>SocketPermission</code> and both its hostname/port combination    * and permissions string are identical.   *   * @param obj The object to test against for equality   *   * @return <code>true</code> if object is equal to this object,    *         <code>false</code> otherwise.   */  public boolean equals(Object obj)  {    if (obj == null)      return (false);    if (!(obj instanceof SocketPermission))      return (false);    if (((SocketPermission) obj).hostport.equals(hostport))      if (((SocketPermission) obj).actions.equals(actions))	return (true);    return (false);  }  /**   * Returns a hash code value for this object.  Overrides the    * Permission.hashCode()   *   * @return A hash code   */  public int hashCode()  {    int hash = 100;    if (hostport != null)      hash += hostport.hashCode();    if (actions != null)      hash += actions.hashCode();    return hash;  }  /**   * Returns the list of permission actions in this object in canonical   * order.  The canonical order is "connect,listen,accept,resolve"   *   * @return The permitted action string.   */  public String getActions()  {    boolean found = false;    StringBuffer sb = new StringBuffer("");    if (actions.indexOf("connect") != -1)      {	sb.append("connect");	found = true;      }    if (actions.indexOf("listen") != -1)      if (found)	  sb.append(",listen");      else	{	  sb.append("listen");	  found = true;	}    if (actions.indexOf("accept") != -1)      if (found)	sb.append(",accept");      else	{	  sb.append("accept");	  found = true;	}    if (found)      sb.append(",resolve");    else if (actions.indexOf("resolve") != -1)      sb.append("resolve");    return (sb.toString());  }  /**   * Returns a new <code>PermissionCollection</code> object that can hold   * <code>SocketPermission</code>'s.   *   * @return A new <code>PermissionCollection</code>.   */  public PermissionCollection newPermissionCollection()  {    // FIXME: Implement    return (null);  }  /**   * Returns true if the permission object passed it is implied by the   * this permission.  This will be true if    * <p><ul>   * <li>The argument is of type SocketPermission   * <li>The actions list of the argument are in this object's actions   * <li>The port range of the argument is within this objects port range   * <li>The hostname is equal to or a subset of this objects hostname   * </ul>   * <p>   * The argument's hostname will be a subset of this object's hostname if:   * <p><ul>   * <li>The argument's hostname or IP address is equal to this object's.   * <li>The argument's canonical hostname is equal to this object's.   * <li>The argument's canonical name matches this domains hostname with   * wildcards   * </ul>   *   * @param perm The Permission to check against   *   * @return <code>true</code> if the <code>Permission</code> is implied by    * this object, <code>false</code> otherwise.   */  public boolean implies(Permission perm)  {    SocketPermission p;    // First make sure we are the right object type    if (perm instanceof SocketPermission)      p = (SocketPermission) perm;    else      return (false);    // Next check the actions    String ourlist = getActions();    String theirlist = p.getActions();    if (!ourlist.startsWith(theirlist))      return (false);    // Now check ports    int ourfirstport = 0, ourlastport = 0, theirfirstport = 0, theirlastport =      0;    // Get ours    if (hostport.indexOf(":") == -1)      {        ourfirstport = 0;        ourlastport = 65535;      }    else      {        // FIXME:  Needs bulletproofing.        // This will dump if hostport if all sorts of bad data was passed to        // the constructor        String range = hostport.substring(hostport.indexOf(":") + 1);        if (range.startsWith("-"))          ourfirstport = 0;        else if (range.indexOf("-") == -1)          ourfirstport = Integer.parseInt(range);        else          ourfirstport =            Integer.parseInt(range.substring(0, range.indexOf("-")));        if (range.endsWith("-"))          ourlastport = 65535;        else if (range.indexOf("-") == -1)          ourlastport = Integer.parseInt(range);        else          ourlastport =            Integer.parseInt(range.                             substring(range.indexOf("-") + 1,                                       range.length()));      }    // Get theirs    if (p.hostport.indexOf(":") == -1)      {        theirfirstport = 0;        ourlastport = 65535;      }    else      {        // This will dump if hostport if all sorts of bad data was passed to        // the constructor        String range = p.hostport.substring(hostport.indexOf(":") + 1);        if (range.startsWith("-"))          theirfirstport = 0;        else if (range.indexOf("-") == -1)          theirfirstport = Integer.parseInt(range);        else          theirfirstport =            Integer.parseInt(range.substring(0, range.indexOf("-")));        if (range.endsWith("-"))          theirlastport = 65535;        else if (range.indexOf("-") == -1)          theirlastport = Integer.parseInt(range);        else          theirlastport =            Integer.parseInt(range.                             substring(range.indexOf("-") + 1,                                       range.length()));      }    // Now check them    if ((theirfirstport < ourfirstport) || (theirlastport > ourlastport))      return (false);    // Finally we can check the hosts    String ourhost, theirhost;    // Get ours    if (hostport.indexOf(":") == -1)      ourhost = hostport;    else      ourhost = hostport.substring(0, hostport.indexOf(":"));    // Get theirs    if (p.hostport.indexOf(":") == -1)      theirhost = p.hostport;    else      theirhost = p.hostport.substring(0, p.hostport.indexOf(":"));    // Are they equal?    if (ourhost.equals(theirhost))      return (true);    // Try the canonical names    String ourcanonical = null, theircanonical = null;    try      {        ourcanonical = InetAddress.getByName(ourhost).getHostName();        theircanonical = InetAddress.getByName(theirhost).getHostName();      }    catch (UnknownHostException e)      {        // Who didn't resolve?  Just assume current address is canonical enough        // Is this ok to do?        if (ourcanonical == null)          ourcanonical = ourhost;        if (theircanonical == null)          theircanonical = theirhost;      }    if (ourcanonical.equals(theircanonical))      return (true);    // Well, last chance.  Try for a wildcard    if (ourhost.indexOf("*.") != -1)      {        String wild_domain = ourhost.substring(ourhost.indexOf("*" + 1));        if (theircanonical.endsWith(wild_domain))          return (true);      }    // Didn't make it    return (false);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人动漫在线一区| 久久综合色综合88| 久久亚洲捆绑美女| 亚洲一区在线观看免费| 国产九色sp调教91| 欧美怡红院视频| 国产精品久久三区| 国内成人免费视频| 欧美一级久久久| 亚洲影院在线观看| 91免费小视频| 国产视频视频一区| 免费av网站大全久久| 欧美午夜一区二区三区| 亚洲欧美激情小说另类| 国产高清不卡一区二区| 精品国产乱码久久久久久夜甘婷婷 | 欧美人伦禁忌dvd放荡欲情| 国产精品蜜臀在线观看| 国产另类ts人妖一区二区| 日韩精品中文字幕一区二区三区| 亚洲一区二区三区四区在线观看| 97精品国产露脸对白| 日本一区二区电影| 国产精品中文字幕日韩精品| 精品久久国产97色综合| 蜜芽一区二区三区| 日韩视频在线你懂得| 蜜桃视频免费观看一区| 日韩欧美不卡在线观看视频| 另类专区欧美蜜桃臀第一页| 日韩欧美不卡一区| 国产真实乱对白精彩久久| 精品国产一区二区三区不卡 | 国产精品影视天天线| 欧美精品一区二区久久婷婷| 美女免费视频一区二区| 日韩精品一区在线观看| 久久99久久久欧美国产| 久久久蜜臀国产一区二区| 国产黄色精品网站| 国产精品女主播在线观看| 成人精品免费网站| 日韩一区欧美小说| 欧美午夜电影在线播放| 亚洲h在线观看| 欧美一区二区免费观在线| 久久99精品视频| 国产网站一区二区| 99久久亚洲一区二区三区青草| 亚洲色大成网站www久久九九| 色噜噜夜夜夜综合网| 亚洲成人免费视频| 精品国产一区二区三区久久久蜜月| 国产一区二区三区免费| ...中文天堂在线一区| 欧洲生活片亚洲生活在线观看| 五月激情综合色| 欧美刺激午夜性久久久久久久| 国产精品资源网| 一区二区三区久久久| 欧美一区二区三区啪啪| 国产精品影视在线| 亚洲国产一区在线观看| 日韩女优毛片在线| 91女人视频在线观看| 日本中文字幕不卡| 国产人成一区二区三区影院| 日本韩国欧美国产| 黑人精品欧美一区二区蜜桃| 亚洲伦在线观看| 精品久久国产老人久久综合| 在线欧美小视频| 国产福利一区在线观看| 视频一区在线播放| 国产精品久久久久一区| 欧美一卡二卡三卡四卡| 91污片在线观看| 激情综合色综合久久综合| 自拍av一区二区三区| 精品国产a毛片| 欧美视频你懂的| 99精品视频中文字幕| 免费视频最近日韩| 亚洲一区二区在线免费看| 国产日韩影视精品| 欧美α欧美αv大片| 色老汉av一区二区三区| 成人国产在线观看| 国产综合一区二区| 蜜桃视频一区二区三区在线观看| 一区二区三区四区中文字幕| 国产视频在线观看一区二区三区 | 奇米精品一区二区三区在线观看一 | 日本在线不卡视频| 亚洲人成影院在线观看| 久久久久久久国产精品影院| 欧美浪妇xxxx高跟鞋交| 91视频在线观看| 成人激情免费网站| 国产精品影视天天线| 免费高清成人在线| 美腿丝袜亚洲一区| 日本成人在线电影网| 天堂va蜜桃一区二区三区| 亚洲免费av高清| 日韩美女啊v在线免费观看| 国产精品看片你懂得| 国产日韩高清在线| 中文字幕不卡在线观看| 中文成人av在线| 国产精品三级电影| 国产精品免费av| 国产精品丝袜在线| 亚洲欧洲成人av每日更新| 国产精品视频免费看| 国产农村妇女毛片精品久久麻豆| 精品电影一区二区三区| 久久久三级国产网站| 欧美激情一区二区三区在线| 中文子幕无线码一区tr| 国产精品乱人伦| 亚洲欧美日韩在线播放| 怡红院av一区二区三区| 亚洲一线二线三线视频| 午夜精品一区二区三区免费视频| 免费美女久久99| 黄色小说综合网站| 成人免费毛片片v| 99re热这里只有精品视频| 欧美视频精品在线| 日韩一区二区不卡| 国产女人18水真多18精品一级做| 国产精品情趣视频| 亚洲国产精品久久久久秋霞影院| 秋霞电影网一区二区| 国产精品 欧美精品| 色综合久久久网| 日韩欧美国产午夜精品| 国产亲近乱来精品视频| 亚洲精品国产无天堂网2021| 香蕉久久夜色精品国产使用方法| 麻豆成人综合网| eeuss鲁一区二区三区| 欧美三级日韩在线| 久久久久久99精品| 亚洲大片精品永久免费| 国产在线不卡一卡二卡三卡四卡| 波多野结衣精品在线| 欧美性一级生活| 久久久亚洲欧洲日产国码αv| 日韩毛片视频在线看| 日韩av高清在线观看| 懂色av一区二区夜夜嗨| 欧美视频在线一区二区三区 | 这里只有精品免费| 国产三区在线成人av| 天堂久久一区二区三区| 成人av在线电影| 精品剧情在线观看| 一区二区三区 在线观看视频| 狠狠色丁香久久婷婷综合_中| 一本大道久久精品懂色aⅴ| 欧美精品一区二区三区蜜臀| 亚洲国产精品综合小说图片区| 国产精品亚洲第一| 日韩一级精品视频在线观看| 亚洲免费在线观看视频| 国产成人综合亚洲网站| 欧美一区二区成人| 亚洲va天堂va国产va久| 91视频91自| 国产精品青草久久| 国产精品一线二线三线精华| 日韩天堂在线观看| 亚洲国产aⅴ天堂久久| 91玉足脚交白嫩脚丫在线播放| 欧美精品一区二区三区视频 | 精品免费日韩av| 亚洲 欧美综合在线网络| av中文字幕在线不卡| 国产三级精品三级| 韩国女主播成人在线| 日韩欧美在线影院| 亚洲成人久久影院| 欧美日韩国产在线播放网站| 亚洲欧洲中文日韩久久av乱码| 风间由美中文字幕在线看视频国产欧美| 91精品国产综合久久久久| 亚洲丰满少妇videoshd| 91久久线看在观草草青青 | 一本一本大道香蕉久在线精品 | 99综合影院在线| 欧美国产一区视频在线观看| 国产成人精品免费网站| 久久欧美一区二区| 国产成人亚洲综合a∨婷婷图片| 久久婷婷国产综合国色天香| 国产乱子伦一区二区三区国色天香| 精品国产露脸精彩对白|