Package de.galan.commons.net
Class Ports
- java.lang.Object
-
- de.galan.commons.net.Ports
-
public class Ports extends Object
Port-related utility methods.
-
-
Constructor Summary
Constructors Constructor Description Ports()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IntegerfindFree()Tries to find a free port in the range defined by the IANA for ephemeral ports.static IntegerfindFree(int lowIncluse, int highInclusive)Returns a free port in the defined range, returns null if none is available.static booleanisFree(int port)
-
-
-
Method Detail
-
findFree
public static Integer findFree()
Tries to find a free port in the range defined by the IANA for ephemeral ports.
-
findFree
public static Integer findFree(int lowIncluse, int highInclusive)
Returns a free port in the defined range, returns null if none is available.
-
isFree
public static boolean isFree(int port)
-
-