Package com.googlecode.ipv6

Examples of com.googlecode.ipv6.IPv6Address.compareTo()


      IPv6Address ipEnd = IPv6Address.fromString("1234:5678::ffff:ffff:ffff:ffff");
      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here


      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::f-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here

      IPv6Address ipEnd = IPv6Address.fromString("1234:5678::ffff:ffff:ffff:ffff");
      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here

      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::f-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here

      IPv6Address ipEnd = IPv6Address.fromString("1234:5678::ffff:ffff:ffff:ffff");
      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here

      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::f-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here

      IPv6Address ipEnd = IPv6Address.fromString("1234:5678::ffff:ffff:ffff:ffff");
      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here

      for (int i = 0; i < 10; i ++) {
        ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
        s_logger.info("IP is " + ipString);
        IPv6Address ip = IPv6Address.fromString(ipString);
        assertTrue(ip.compareTo(ipStart) >= 0);
        assertTrue(ip.compareTo(ipEnd) <= 0);
      }
      //Test isIp6RangeOverlap
      assertFalse(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678:1::1-1234:5678:1::ffff"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::1-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
      assertTrue(NetUtils.isIp6RangeOverlap("1234:5678::f-1234:5678::ffff", "1234:5678::2-1234:5678::f"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.