README.md
December 5, 2022 ยท View on GitHub
Description
How do I convert a numeric IP address like 199.1.32.90 into a hostname like star.blackstar.com?
Unfortunately due to an unintended side effect (i.e. a bug) in Java's caching of IP addresses and hostnames, Java 1.0 can't convert numeric IP addresses into hostnames. However this is straightforward in Java 1.1. For example,
(Java FAQ:found on the web at:http://sunsite.unc.edu/javafaq/javafaq.html)
More Info
| Submitted On | |
| By | N/A |
| Level | Unknown |
| User Rating | 5.0 (10 globes from 2 users) |
| Compatibility | Java (JDK 1.1) |
| Category | Internet/ Browsers/ HTML |
| World | Java |
| Archive File |
Source Code
String hostname = InetAddress.getByName("199.1.32.90").getHostName()