Package com.caucho.util

Examples of com.caucho.util.InetNetwork


        return true;
    }

    if (_forbiddenNets != null) {
      for (int i = _forbiddenNets.size(); i >= 0; i--) {
        InetNetwork net = (InetNetwork) _forbiddenNets.get(i);

        if (net.isMatch(addr))
          return true;
      }
    }

    return false;
View Full Code Here


    constraint.init();
    webAppConfig.addBuilderProgram(new PropertyValueProgram("security-constraint", constraint));

    try {
      _allowedNetworks = new InetNetwork[] {
        new InetNetwork(InetAddress.getByName("127.0.0.1"), 24),
        new InetNetwork(InetAddress.getByName("10.0.0.0"), 24),
        new InetNetwork(InetAddress.getByName("172.16.0.0"), 20),
        new InetNetwork(InetAddress.getByName("192.168.0.0"), 16),
      };
    } catch (UnknownHostException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.util.InetNetwork

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.