public final class Network
extends java.lang.Object
Network represents an IP network.| Constructor and Description |
|---|
Network(java.net.InetAddress ipAddress,
int prefixLength)
Construct a
Network |
| Modifier and Type | Method and Description |
|---|---|
java.net.InetAddress |
getNetworkAddress() |
int |
getPrefixLength() |
java.lang.String |
toString() |
public Network(java.net.InetAddress ipAddress,
int prefixLength)
NetworkipAddress - An IP address in the network. This does not have to be
the first address in the network.prefixLength - The prefix length for the network.public java.net.InetAddress getNetworkAddress()
public int getPrefixLength()
public java.lang.String toString()
toString in class java.lang.Object1.2.3.0/24 or 2001::/8.Copyright © 2019 MaxMind, Inc.. All Rights Reserved.