public class IPAddress extends Object
Constructor and Description |
---|
IPAddress() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
asBytes(String addr)
Convert a TCP/IP address string into a byte array
|
static int |
asInteger(InetAddress ipaddr)
Convert an IP address into an integer value
|
static String |
asString(byte[] ipaddr)
Convert a raw IP address array as a String
|
static String |
asString(int ipaddr)
Convert a raw IP address array as a String
|
static boolean |
isInSubnet(String ipaddr,
String subnet,
String mask)
Check if the specified address is within the required subnet
|
static boolean |
isNumericAddress(String ipaddr)
Check if the specified address is a valid numeric TCP/IP address
|
static int |
parseNumericAddress(String ipaddr)
Check if the specified address is a valid numeric TCP/IP address and return as an integer value
|
public static final boolean isNumericAddress(String ipaddr)
ipaddr
- Stringpublic static final int parseNumericAddress(String ipaddr)
ipaddr
- Stringpublic static final int asInteger(InetAddress ipaddr)
ipaddr
- InetAddresspublic static final boolean isInSubnet(String ipaddr, String subnet, String mask)
ipaddr
- Stringsubnet
- Stringmask
- Stringpublic static final String asString(byte[] ipaddr)
ipaddr
- byte[]public static final String asString(int ipaddr)
ipaddr
- intpublic static final byte[] asBytes(String addr)
addr
- StringCopyright © 2005–2017 Alfresco Software. All rights reserved.