code: public InetAddress getInetAddress(){
        if(localIP == null){
  	 try{
  	   localIP = InetAddress.getByName(localHost);
  	 }catch(UnknownHostException e){
  	   return null;
  	 }
        }
        return localIP;
     }
docs: Get address assigned by proxy to listen for incomming
  connections, or the local machine address if doing direct
  connection.