Created
July 8, 2014 13:33
-
-
Save robUx4/4a8a6f15c4e7d96021e3 to your computer and use it in GitHub Desktop.
Android InetSocketAddress source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns the hostname if known, or the result of {@code InetAddress.getHostAddress}. | |
* Unlike {@link #getHostName}, this method will never cause a DNS lookup. | |
* @since 1.7 | |
* @hide 1.7 - remember to add a link in the getHostName documentation! | |
*/ | |
public final String getHostString() { | |
return (hostname != null) ? hostname : addr.getHostAddress(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment