|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.core.utils.InetAddressUtils
public abstract class InetAddressUtils
Abstract InetAddressUtils class.
| Nested Class Summary | |
|---|---|
static class |
InetAddressUtils.AddressType
|
| Field Summary | |
|---|---|
static InetAddress |
UNPINGABLE_ADDRESS
|
static InetAddress |
UNPINGABLE_ADDRESS_IPV6
|
| Constructor Summary | |
|---|---|
InetAddressUtils()
|
|
| Method Summary | |
|---|---|
static InetAddress |
addr(String ipAddrString)
|
static InetAddress |
convertBigIntegerIntoInetAddress(BigInteger i)
|
static InetAddress |
convertCidrToInetAddressV4(int cidr)
|
static InetAddress |
convertCidrToInetAddressV6(int cidr)
|
static byte[] |
decr(byte[] address)
|
static String |
decr(String address)
|
static BigInteger |
difference(InetAddress addr1,
InetAddress addr2)
|
static BigInteger |
difference(String addr1,
String addr2)
|
static InetAddress |
getInetAddress(byte[] ipAddrOctets)
getInetAddress |
static InetAddress |
getInetAddress(int[] octets,
int offset,
int length)
getInetAddress |
static InetAddress |
getInetAddress(String dottedNotation)
getInetAddress |
static InetAddress |
getLocalHostAddress()
|
static String |
getLocalHostAddressAsString()
|
static String |
getLocalHostName()
|
static InetAddress |
getLowestInetAddress(List<InetAddress> addresses)
Given a list of IP addresses, return the lowest as determined by the numeric representation and not the alphanumeric string. |
static byte[] |
incr(byte[] address)
|
static String |
incr(String address)
|
static boolean |
inSameScope(InetAddress addr1,
InetAddress addr2)
|
static boolean |
isInetAddressInRange(byte[] addr,
byte[] begin,
byte[] end)
|
static boolean |
isInetAddressInRange(byte[] laddr,
String beginString,
String endString)
|
static boolean |
isInetAddressInRange(String ipAddr,
byte[] begin,
byte[] end)
|
static boolean |
isInetAddressInRange(String addrString,
String beginString,
String endString)
|
static String |
macAddressBytesToString(byte[] macAddress)
|
static byte[] |
macAddressStringToBytes(String macAddress)
|
static String |
normalize(String ipAddrString)
This function is used to ensure that an IP address string is in fully-qualified format without any "::" segments for an IPv6 address. |
static String |
normalizeMacAddress(String macAddress)
|
static InetAddress |
resolveHostname(String hostname,
boolean preferInet6Address)
|
static InetAddress |
resolveHostname(String hostname,
boolean preferInet6Address,
boolean throwException)
This function is used inside XSLT documents, do a string search before refactoring. |
static String |
str(InetAddress addr)
|
static BigInteger |
toInteger(InetAddress ipAddress)
|
static byte[] |
toIpAddrBytes(String dottedNotation)
toIpAddrBytes |
static String |
toIpAddrString(byte[] addr)
toIpAddrString |
static String |
toIpAddrString(InetAddress addr)
toIpAddrString |
static String |
toOid(InetAddress addr)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final InetAddress UNPINGABLE_ADDRESS
public static final InetAddress UNPINGABLE_ADDRESS_IPV6
| Constructor Detail |
|---|
public InetAddressUtils()
| Method Detail |
|---|
public static InetAddress getLocalHostAddress()
public static String getLocalHostAddressAsString()
public static String getLocalHostName()
public static String incr(String address)
throws UnknownHostException
UnknownHostException
public static byte[] incr(byte[] address)
throws UnknownHostException
UnknownHostException
public static String decr(String address)
throws UnknownHostException
UnknownHostException
public static byte[] decr(byte[] address)
throws UnknownHostException
UnknownHostException
public static InetAddress getInetAddress(int[] octets,
int offset,
int length)
getInetAddress
ipAddrOctets - an array of byte.
InetAddress object.public static InetAddress getInetAddress(byte[] ipAddrOctets)
getInetAddress
ipAddrOctets - an array of byte.
InetAddress object.public static InetAddress getInetAddress(String dottedNotation)
getInetAddress
dottedNotation - a String object.
InetAddress object.
public static InetAddress resolveHostname(String hostname,
boolean preferInet6Address)
throws UnknownHostException
UnknownHostException
public static InetAddress resolveHostname(String hostname,
boolean preferInet6Address,
boolean throwException)
throws UnknownHostException
UnknownHostExceptionpublic static byte[] toIpAddrBytes(String dottedNotation)
toIpAddrBytes
dottedNotation - a String object.
public static String toIpAddrString(InetAddress addr)
toIpAddrString
addr - IP address
String object.public static String toIpAddrString(byte[] addr)
toIpAddrString
addr - an array of byte.
String object.public static InetAddress getLowestInetAddress(List<InetAddress> addresses)
addresses - a List object.
InetAddress object.
public static BigInteger difference(String addr1,
String addr2)
public static BigInteger difference(InetAddress addr1,
InetAddress addr2)
public static boolean isInetAddressInRange(byte[] laddr,
String beginString,
String endString)
public static boolean isInetAddressInRange(String addrString,
String beginString,
String endString)
public static boolean inSameScope(InetAddress addr1,
InetAddress addr2)
public static boolean isInetAddressInRange(byte[] addr,
byte[] begin,
byte[] end)
public static boolean isInetAddressInRange(String ipAddr,
byte[] begin,
byte[] end)
public static InetAddress convertCidrToInetAddressV4(int cidr)
public static InetAddress convertCidrToInetAddressV6(int cidr)
public static InetAddress convertBigIntegerIntoInetAddress(BigInteger i)
throws UnknownHostException
UnknownHostExceptionpublic static InetAddress addr(String ipAddrString)
public static String normalize(String ipAddrString)
public static String str(InetAddress addr)
public static BigInteger toInteger(InetAddress ipAddress)
public static String toOid(InetAddress addr)
public static byte[] macAddressStringToBytes(String macAddress)
public static String macAddressBytesToString(byte[] macAddress)
public static String normalizeMacAddress(String macAddress)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||