Package org.apache.lenya.net

Examples of org.apache.lenya.net.InetAddressUtil


         * FIXME? by zisch@dals.ch: Maybe some mapping between IPv4/v6 should be done here, p.e. for
         * the localhost (see the javdoc comment above)? (I'm not a TCP/IP-guru, so I'm not sure
         * about this. ;-)
         */
        getLogger().debug("Checking IP range: [" + getId() + "]");
        InetAddressUtil util = new InetAddressUtil(getLogger());
        return util.contains(this.networkAddress, this.subnetMask, machine.getAddress());
    }
View Full Code Here


        try {
            InetAddress networkAddress = InetAddress.getByName(args[0]);
            InetAddress subnetMask = InetAddress.getByName(args[1]);
            Machine machine = new Machine(args[2]);

            InetAddressUtil util = new InetAddressUtil(new ConsoleLogger());
            if (util.contains(networkAddress, subnetMask, machine.getAddress())) {
                System.out.println("true");
            } else {
                System.out.println("false");
            }
        } catch (final UnknownHostException e) {
View Full Code Here

TOP

Related Classes of org.apache.lenya.net.InetAddressUtil

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.