public class IPv4
extends java.lang.Object
| Constructor and Description |
|---|
IPv4() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
expandSubnet(int ip,
int subnet)
Expand a subnet to all possible addresses.
|
static int[] |
expandSubnet(java.lang.String ipAndSubnet)
Expand a subnet to all possible addresses.
|
static int |
toInt(java.lang.String ip)
Convert an IPv4 address to an int.
|
static java.lang.String |
toString(int ip)
Convert an int to an IPv4 address.
|
public static int toInt(java.lang.String ip)
ip - The IPv4 address to convertpublic static java.lang.String toString(int ip)
ip - The int to convertpublic static int[] expandSubnet(java.lang.String ipAndSubnet)
ipAndSubnet - The IP and subnet in the format of 192.168.0.1/24public static int[] expandSubnet(int ip,
int subnet)
ip - The IP to expandsubnet - The subnet to expand