Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connecting Whois server

800289Feb 26 2010 — edited Mar 1 2010
I have written coding to connect with whois server. But its not connecting.
           theSocket = new Socket("whois.internic.net", 43);
           ps = new PrintStream(theSocket.getOutputStream());
           for (int i = 0; i < args.length; i++) ps.print(args[i] + " ");
           ps.print("\r\n");
           theWhoisStream = new DataInputStream(theSocket.getInputStream());
           String s;
           while ((s = theWhoisStream.readLine()) != null) {
           System.out.println(s);
           }
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2010
Added on Feb 26 2010
4 comments
115 views