public final class IPAddress extends Object
© Devmel SDK (java) ©
Modifier and Type | Field and Description |
---|---|
static int |
Addr4Size |
static int |
Addr4StrSize |
static int |
Addr6Size |
static int |
Addr6StrSize |
Constructor and Description |
---|
IPAddress() |
Modifier and Type | Method and Description |
---|---|
static String |
fromBytes(byte[] src)
Returns the IP address string (version 4 and 6) in textual presentation
|
static boolean |
isV4(byte[] src)
Utility routine to check if the raw IP address is an IPv4
|
static boolean |
isV4(String src)
Utility routine to check if the IP address string is an IPv4
|
static boolean |
isV6(byte[] src)
Utility routine to check if the raw IP address is an IPv6
|
static boolean |
isV6(String src)
Utility routine to check if the IP address string is an IPv6
|
static byte[] |
toBytes(String src)
Returns the raw IP address (version 4 and 6) in network byte order
|
public static final int Addr4Size
public static final int Addr4StrSize
public static final int Addr6Size
public static final int Addr6StrSize
public static String fromBytes(byte[] src)
src
- the raw IP address in network byte orderpublic static boolean isV4(byte[] src)
src
- the raw IP addressboolean
indicating whether src is an IPv4 addresspublic static boolean isV4(String src)
src
- the IP address string in textual presentationboolean
indicating whether src is an IPv4 literal addresspublic static boolean isV6(byte[] src)
src
- the raw IP addressboolean
indicating whether src is an IPv6 addresspublic static boolean isV6(String src)
src
- the IP address string in textual presentationboolean
indicating whether src is an IPv6 literal addresspublic static byte[] toBytes(String src)
src
- the IP address string in textual presentation