final IPv4Address network = IPv4Address.createFromString(parts[0]);
if(parts.length == 1)
return new Network(network, 32, networkString);
if(parts.length != 2)
throw new TorParsingException("Invalid network CIDR notation: " + networkString);
try {
final int maskBits = Integer.parseInt(parts[1]);
return new Network(network, maskBits, networkString);
} catch(NumberFormatException e) {
throw new TorParsingException("Invalid netblock mask bit value: " + parts[1]);
}
}