protected static void assertPortAvailable(final InetAddress bindAddress,final int port) throws BindException {
  if (!AvailablePort.isPortAvailable(port,AvailablePort.SOCKET,bindAddress)) {
    throw new BindException(String.format("Network is unreachable; port (%1$d) is not available on %2$s.",port,(bindAddress != null ? bindAddress.getCanonicalHostName() : "localhost")));
  }
}

protected static void assertPortAvailable ( final InetAddress bindAddress , final int port ) throws BindException { if ( ! AvailablePort . isPortAvailable ( port , AvailablePort . SOCKET , bindAddress ) ) { throw new BindException ( String . format ( "Network is unreachable; port (%1$d) is not available on %2$s." , port , ( bindAddress != null ? bindAddress . getCanonicalHostName ( ) : "localhost" ) ) ) ; } }
asserts that the specified port is available on the specified network interface , indicated by it ' s assigned ip address , on this local system .
