This should all be quite self explanatory. I can't remember why I went ahead and implemented this in Java. I think I was just rusty and wanted some practice. What follows is an implementation of the WHOIS protocol used to get information about a record name (in this case specifically domain name records). The nature of the information is contact information, ownership rights, etc.
The full source code and documentation can be downloaded here. This includes the source package and documentation. Depends only on Java core packages (
Let's start with the whois server pool (
WhoisServerPool.java). This is a static map of top level domain names to the whois server that is responsible for maintaining information on domains with that top level domain name.