net.i2p.util
Class Addresses
java.lang.Object
net.i2p.util.Addresses
public abstract class Addresses
- extends Object
Get the local addresses
- Since:
- 0.8.3 moved to core
- Author:
- zzz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Addresses
public Addresses()
getAnyAddress
public static String getAnyAddress()
- Returns:
- the first non-local address it finds, or null
getAddresses
public static SortedSet<String> getAddresses()
- Returns:
- a sorted set of all addresses, excluding
IPv6, local, broadcast, multicast, etc.
getAllAddresses
public static SortedSet<String> getAllAddresses()
- Returns:
- a sorted set of all addresses, excluding
only link local and multicast
- Since:
- 0.8.3
getAddresses
public static SortedSet<String> getAddresses(boolean includeLocal,
boolean includeIPv6)
- Parameters:
includeLocal
- whether to include localincludeIPv6
- whether to include IPV6
- Returns:
- a sorted array of all addresses
- Since:
- 0.8.3
main
public static void main(String[] args)