@Test public void testGetBytesLength() throws Exception { assertEquals(1, IpPrefixConv.getBytesLength(1)); assertEquals(16, IpPrefixConv.getBytesLength(127)); }
public static int getBytesLength(int prefixLength) { return (int) Math.ceil((0xFF & prefixLength) / 8.0); }
IpPrefixConv { public static int getBytesLength(int prefixLength) { return (int) Math.ceil((0xFF & prefixLength) / 8.0); } }
IpPrefixConv { public static int getBytesLength(int prefixLength) { return (int) Math.ceil((0xFF & prefixLength) / 8.0); } private  IpPrefixConv(); }
IpPrefixConv { public static int getBytesLength(int prefixLength) { return (int) Math.ceil((0xFF & prefixLength) / 8.0); } private  IpPrefixConv(); static IpPrefix createPrefix(String ipPrefix); static List<IpPrefix> decodeIpv4(byte[] array, boolean compact); static List<IpPrefix> decodeIpv6(byte[] array, boolean compact); static boolean equalTo(IpPrefix prefix1, IpPrefix prefix2); static int getBytesLength(int prefixLength); static int getPrefixLength(IpPrefix ipPrefix); static InetSocketAddress parseInetPrefix(String ipPrefix); static byte[] toBytes(IpPrefix prefix); static byte[] toBytes(List<IpPrefix> prefixes); static String toString(IpPrefix prefix); static String toString(List<IpPrefix> prefixes); static byte[] trimPrefix(byte[] prefix, int blength); }
IpPrefixConv { public static int getBytesLength(int prefixLength) { return (int) Math.ceil((0xFF & prefixLength) / 8.0); } private  IpPrefixConv(); static IpPrefix createPrefix(String ipPrefix); static List<IpPrefix> decodeIpv4(byte[] array, boolean compact); static List<IpPrefix> decodeIpv6(byte[] array, boolean compact); static boolean equalTo(IpPrefix prefix1, IpPrefix prefix2); static int getBytesLength(int prefixLength); static int getPrefixLength(IpPrefix ipPrefix); static InetSocketAddress parseInetPrefix(String ipPrefix); static byte[] toBytes(IpPrefix prefix); static byte[] toBytes(List<IpPrefix> prefixes); static String toString(IpPrefix prefix); static String toString(List<IpPrefix> prefixes); static byte[] trimPrefix(byte[] prefix, int blength);  }