Package de.galan.commons.net
Class Ports
java.lang.Object
de.galan.commons.net.Ports
Port-related utility methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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)
-
Constructor Details
-
Ports
public Ports()
-
-
Method Details
-
findFree
Tries to find a free port in the range defined by the IANA for ephemeral ports. -
findFree
Returns a free port in the defined range, returns null if none is available. -
isFree
public static boolean isFree(int port)
-