|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.util.inetnetwork.InetNetworkBuilder
public class InetNetworkBuilder
Builds a InetNetwork (Inet4Network or Inet6Network) in function on the provided string pattern that represents a subnet. Inet4Network is constructed based on the IPv4 subnet expressed in one of several formats: IPv4 Format Example Explicit address 127.0.0.1 Address with a wildcard 127.0.0.* Domain name myHost.com Domain name + prefix-length myHost.com/24 Domain name + mask myHost.com/255.255.255.0 IP address + prefix-length 127.0.0.0/8 IP + mask 127.0.0.0/255.0.0.0 For more information on IP V4, see RFC 1518 and RFC 1519. Inet6Network is constructed based on the IPv4 subnet expressed in one of several formats: IPv6 Format Example Explicit address 0000:0000:0000:0000:0000:0000:0000:0001 IP address + subnet mask (/) 0000:0000:0000:0000:0000:0000:0000:0001/64 IP address + subnet mask (%) 0000:0000:0000:0000:0000:0000:0000:0001%64 The following V6 formats will be supported later: Domain name myHost.com Domain name + mask (/) myHost.com/48 Domain name + mask (%) myHost.com%48 Explicit shorted address ::1 For more information on IP V6, see RFC 2460. (see also http://en.wikipedia.org/wiki/IPv6_address)
| Constructor Summary | |
|---|---|
InetNetworkBuilder(DNSService dnsServer)
Constructs a InetNetwork. |
|
| Method Summary | |
|---|---|
InetNetwork |
getFromString(java.lang.String netspec)
Creates a InetNetwork for the given String. |
static boolean |
isV6(java.lang.String netspec)
Returns true if the string parameters is a IPv6 pattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InetNetworkBuilder(DNSService dnsServer)
dnsServer - the DNSService to use| Method Detail |
|---|
public InetNetwork getFromString(java.lang.String netspec)
throws java.net.UnknownHostException
netspec - the String which is will converted to InetNetwork
java.net.UnknownHostExceptionpublic static boolean isV6(java.lang.String netspec)
address -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||