Here is what I get:
And here is my complete code:
import java.net.*;
import java.io.*;
class whois {
public static void main(String args[])throws Exception {
int c;
Socket s=new Socket("whois.internic.net",43);
InputStream in=s.getInputStream();
OutputStream out=s.getOutputStream();
String str=(args.length==0 ? "www.osborne.com" : args[0])+"\n";
byte buf[]=str.getBytes();
out.write(buf);
while((c=in.read())!=-1) {
System.out.print((char)c);
}
s.close();
}
}
Now if I go to this and type there osborne.com, they will give me information about this domain. But I am getting a different output. What is the reason for this? Please explain.