@Test(expected = UnknownPrefixException.class) public void testCreatePrefixErrorHandling2() throws Exception { IpPrefixConv.createPrefix(""); }
public static IpPrefix createPrefix(String ipPrefix) throws UnknownPrefixException { if (ipPrefix == null || ipPrefix.isEmpty()) { throw new UnknownPrefixException("Not defined [\"" + ipPrefix + "\"]"); } if (ipPrefix.startsWith("/")) { ipPrefix = ipPrefix.substring(1); } return IpPrefixBuilder.getDefaultInstance(ipPrefix); }
IpPrefixConv { public static IpPrefix createPrefix(String ipPrefix) throws UnknownPrefixException { if (ipPrefix == null || ipPrefix.isEmpty()) { throw new UnknownPrefixException("Not defined [\"" + ipPrefix + "\"]"); } if (ipPrefix.startsWith("/")) { ipPrefix = ipPrefix.substring(1); } return IpPrefixBuilder.getDefaultInstance(ipPrefix); } }
IpPrefixConv { public static IpPrefix createPrefix(String ipPrefix) throws UnknownPrefixException { if (ipPrefix == null || ipPrefix.isEmpty()) { throw new UnknownPrefixException("Not defined [\"" + ipPrefix + "\"]"); } if (ipPrefix.startsWith("/")) { ipPrefix = ipPrefix.substring(1); } return IpPrefixBuilder.getDefaultInstance(ipPrefix); } private  IpPrefixConv(); }
IpPrefixConv { public static IpPrefix createPrefix(String ipPrefix) throws UnknownPrefixException { if (ipPrefix == null || ipPrefix.isEmpty()) { throw new UnknownPrefixException("Not defined [\"" + ipPrefix + "\"]"); } if (ipPrefix.startsWith("/")) { ipPrefix = ipPrefix.substring(1); } return IpPrefixBuilder.getDefaultInstance(ipPrefix); } 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 IpPrefix createPrefix(String ipPrefix) throws UnknownPrefixException { if (ipPrefix == null || ipPrefix.isEmpty()) { throw new UnknownPrefixException("Not defined [\"" + ipPrefix + "\"]"); } if (ipPrefix.startsWith("/")) { ipPrefix = ipPrefix.substring(1); } return IpPrefixBuilder.getDefaultInstance(ipPrefix); } 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);  }