code: public static InetAddress getLocalIPFromServerSocket(final int port, final int backlog)
  		throws UnknownHostException, IOException
  	{
  		InetAddress inetAddress = null;
  		ServerSocket socket = null;
  		try
  		{
  			socket = new ServerSocket(port, backlog, InetAddress.getLocalHost());
  			inetAddress = socket.getInetAddress();
  			socket.close();
  		}
  		finally
  		{
  			SocketExtensions.closeServerSocket(socket);
  		}
  		return inetAddress;
  	}
docs: Gets the InetAddress object from the local host from a ServerSocket object.
  
  @param port
  the local TCP port
  @param backlog
  the listen backlog
  @return Returns the InetAddress object from the local host from a ServerSocket object.
  @throws IOException
  Signals that an I/O exception has occurred.
  @throws UnknownHostException
  is thrown if the local host name could not be resolved into an address.