Class Ports


  • public class Ports
    extends Object
    Port-related utility methods.
    • Constructor Detail

      • Ports

        public Ports()
    • 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)