Project leader: doug

About this project

A simple Java framework for the WHOIS protocol.

This should all be quite self explanatory. 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 (,, and java.util).

Brief Explanation

Let's start with the whois server pool ( 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.

The next class of note is the resolvers (,,,,, Their job is to process a query in more detail. Some whois servers don't just give you the information. Sometimes you need to search around for it and that is the job of the resolvers. Each WhoisServer uses one type of resolver.

A query object ( is packed with the requested query such as it's name. This is the main object a developer needs to use to issue a query. Once the object is initialised all you need to do is fetch it's response. The getResponse method returns a WhoisResponse with information on the query.

A whois response ( contains the query name and the reply.

Essentially that's it. It can be easily used as an API for reading developers to access the whois system if they have need to or a user can use the JavaWhois application to query the whois server on the command line by executing and giving a list of domain names to query as arguments.


Example of using this code as a developer.

package org.neverfear.whois.examples;
import org.neverfear.whois.WhoisQuery;
import org.neverfear.whois.WhoisResponse;
public class ExampleQuery {
    public static void main(String [] args) throws Exception {
        WhoisQuery query = new WhoisQuery("");
        WhoisResponse response = query.getResponse();

Example of using this code to access custom whois servers.

package org.neverfear.whois.examples;
import org.neverfear.whois.ResolveDefault;
import org.neverfear.whois.WhoisResponse;
import org.neverfear.whois.WhoisServer;
public class CustomServer {
    public static void main(String[] args) throws Exception {
        // Construct a whois server to use the default resolver and query the
        WhoisServer server = new WhoisServer(new ResolveDefault(""));
        // Query this server for the record
        WhoisResponse response = server.query("");
        // Print the response.


This project can be found on GitHub at

Powered by Debian, Jack Daniels, Guinness, and excessive quantities of caffeine and sugar.