java代码判断一个IP地址是否合法并判断该地址是否属于一个给定的子网 Java code Determines whether an IP address is legal and determines whether the address belongs to a given subnet.