File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes How to do this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "How to do this?" Watch "How to do this?" New topic
Author

How to do this?

Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
I want to make an application that can serve as an IP/HostName loopup. It can return the corresponding HostName for an IP and vice vesa. I am not quite sure how to achieve this, Could anyone give me some advice? Thanks.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Well, there are three parts to this:
One part is the interface this program presents to other programs. Don't know if it's a GUI, or an RMI service, or a web page, or what.
The second part is the internal data structure that stores the name/address data. Something as simple as a HashMap may be enough here.
Third, there's getting ahold of the actual information. Again, I don't know what your plans are: do you just want to get the information from DNS, or is it from a flat file or database, or where?
Finally, I should ask: why in Java? Why not simply run BIND?


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to do this?
 
Similar Threads
Sockets and ip
IP Address as a hostname string !
convert ip address into hostname
Getting CommunicationException
How to get the server IP, hostname and MAC?