fromBytes static method
The address from its bytes: four for IPv4, sixteen for IPv6.
Implementation
static DVIpAddress fromBytes(List<int> bytes) {
if ((bytes.length != 4 && bytes.length != 16) ||
bytes.any((int b) => b < 0 || b > 255)) {
throw ArgumentError.value(bytes, 'bytes', 'is not 4 or 16 octets');
}
return DVIpAddress._(_canonical(Uint8List.fromList(bytes)));
}