我有以下一段简单的代码,用于检测给定的IPv4地址是否确实只有数字值(即在去掉这些点之后):
import edu.gcc.processing.exceptions.net.IPAddressNumericException;
//Get the IP address
String address = "239.255.255.255";
//Check to see if this is a number
try {
String IPNumbers = address.replace(".", "");