@Test public void test_ARPA_V4() { NetworkInBytes networkInBytes = ArpaUtil.parseArpa("2.0.0.in-addr.arpa"); assertEquals(IpVersion.V4, networkInBytes.getIpVersion()); assertEquals("0.0.2.0", networkInBytes.getStartAddressAsString()); assertArrayEquals("", IpV4.toByteArray("0.0.2.0"), networkInBytes.getStartAddress()); assertEquals("0.0.2.255", networkInBytes.getEndAddressAsString()); assertArrayEquals("", IpV4.toByteArray("0.0.2.255"), networkInBytes.getEndAddress()); }
public static NetworkInBytes parseArpa(String name) { LOGGER.debug("parseArpa:{}", name); if (StringUtils.isEmpty(name)) { return null; } else if (StringUtils.endsWith(name, DomainUtil.IPV4_ARPA_SUFFIX)) { return parseIpV4Arpa(name); } else if (StringUtils.endsWith(name, DomainUtil.IPV6_ARPA_SUFFIX)) { return parseIpV6Arpa(name); } return null; }
ArpaUtil { public static NetworkInBytes parseArpa(String name) { LOGGER.debug("parseArpa:{}", name); if (StringUtils.isEmpty(name)) { return null; } else if (StringUtils.endsWith(name, DomainUtil.IPV4_ARPA_SUFFIX)) { return parseIpV4Arpa(name); } else if (StringUtils.endsWith(name, DomainUtil.IPV6_ARPA_SUFFIX)) { return parseIpV6Arpa(name); } return null; } }
ArpaUtil { public static NetworkInBytes parseArpa(String name) { LOGGER.debug("parseArpa:{}", name); if (StringUtils.isEmpty(name)) { return null; } else if (StringUtils.endsWith(name, DomainUtil.IPV4_ARPA_SUFFIX)) { return parseIpV4Arpa(name); } else if (StringUtils.endsWith(name, DomainUtil.IPV6_ARPA_SUFFIX)) { return parseIpV6Arpa(name); } return null; } private  ArpaUtil(); }
ArpaUtil { public static NetworkInBytes parseArpa(String name) { LOGGER.debug("parseArpa:{}", name); if (StringUtils.isEmpty(name)) { return null; } else if (StringUtils.endsWith(name, DomainUtil.IPV4_ARPA_SUFFIX)) { return parseIpV4Arpa(name); } else if (StringUtils.endsWith(name, DomainUtil.IPV6_ARPA_SUFFIX)) { return parseIpV6Arpa(name); } return null; } private  ArpaUtil(); static NetworkInBytes parseArpa(String name); }
ArpaUtil { public static NetworkInBytes parseArpa(String name) { LOGGER.debug("parseArpa:{}", name); if (StringUtils.isEmpty(name)) { return null; } else if (StringUtils.endsWith(name, DomainUtil.IPV4_ARPA_SUFFIX)) { return parseIpV4Arpa(name); } else if (StringUtils.endsWith(name, DomainUtil.IPV6_ARPA_SUFFIX)) { return parseIpV6Arpa(name); } return null; } private  ArpaUtil(); static NetworkInBytes parseArpa(String name);  }