public static byte [ ] toByteArray ( String s , int family ) { if ( family == IPv4 ) return parseV4 ( s ) ; else if ( family == IPv6 ) return parseV6 ( s ) ; else throw new IllegalArgumentException ( "unknown address family" ) ; }
Convert a string containing an IP address to an array of 4 or 16 bytes .