public class IPRange extends Object
| Constructor and Description |
|---|
IPRange(byte[] min,
byte[] max,
byte[] address)
Creates new IPRange object
|
IPRange(String min,
String max,
String address)
Creates new IPRange object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Equals of IPRange object.
|
byte[] |
getAddress()
Retuns address that is assigned to this range
|
byte[] |
getMaxAsByteArray()
Returns maximal ip address of the range
|
byte[] |
getMinAsByteArray()
Returns minimal ip address of the range
|
int |
hashCode()
Hashcode of IPRange object.
|
boolean |
isInRange(String address)
Checks if address is in range
|
static byte[] |
toByteArray(String address)
Convers IPv4 address to byte array
|
public IPRange(String min, String max, String address)
min - minal ip addressmax - maximal ip addressaddress - ip address that will be used as host for this rangepublic IPRange(byte[] min,
byte[] max,
byte[] address)
min - minimal ip addressmax - maximal ip addressaddress - ip address that will be used as host for this rangepublic boolean isInRange(String address)
address - address to check if is in rangepublic byte[] getAddress()
public byte[] getMinAsByteArray()
public byte[] getMaxAsByteArray()
public static byte[] toByteArray(String address)
address - String to convertpublic boolean equals(Object o)
Copyright © 2014–2015. All rights reserved.