public static boolean isInRange(String ip, String cidr) {
		final int maskSplitMarkIndex = cidr.lastIndexOf(Ipv4Util.IP_MASK_SPLIT_MARK);
		if (maskSplitMarkIndex < 0) {
			throw new IllegalArgumentException("Invalid cidr: " + cidr);
		}

		final long mask = (-1L << 32 - Integer.parseInt(cidr.substring(maskSplitMarkIndex + 1)));
		long cidrIpAddr = ipv4ToLong(cidr.substring(0, maskSplitMarkIndex));

		return (ipv4ToLong(ip) & mask) == (cidrIpAddr & mask);
	}
@Test
	public void isInRangeTest(){
		assertTrue(NetUtil.isInRange("114.114.114.114","0.0.0.0/0"));
		assertTrue(NetUtil.isInRange("192.168.3.4","192.0.0.0/8"));
		assertTrue(NetUtil.isInRange("192.168.3.4","192.168.0.0/16"));
		assertTrue(NetUtil.isInRange("192.168.3.4","192.168.3.0/24"));
		assertTrue(NetUtil.isInRange("192.168.3.4","192.168.3.4/32"));
		assertFalse(NetUtil.isInRange("8.8.8.8","192.0.0.0/8"));
		assertFalse(NetUtil.isInRange("114.114.114.114","192.168.3.4/32"));
	}