org.codeartisans.java.toolbox.network
Class FreePortFinder
java.lang.Object
org.codeartisans.java.toolbox.network.FreePortFinder
public final class FreePortFinder
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOOPBACK
public static final java.lang.String LOOPBACK
- See Also:
- Constant Field Values
ALL_INTERFACES
public static final java.lang.String ALL_INTERFACES
- See Also:
- Constant Field Values
isFree
public static boolean isFree(int port)
isFree
public static boolean isFree(java.net.InetAddress address,
int port)
findRandom
public static int findRandom()
throws java.io.IOException
- Throws:
java.io.IOException
findWithPreference
public static int findWithPreference(int prefered)
throws java.io.IOException
- Throws:
java.io.IOException
findRandomOnIface
public static int findRandomOnIface(java.net.InetAddress address)
throws java.io.IOException
- Throws:
java.io.IOException
findOnIfaceWithPreference
public static int findOnIfaceWithPreference(java.net.InetAddress address,
int prefered)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2012. All Rights Reserved.