Article View: borland.public.jbuilder.java.api
Article #1062about a socket programm
From: Zhilei Ma
Date: Fri, 31 May 2002 09:54
Date: Fri, 31 May 2002 09:54
40 lines
1768 bytes
1768 bytes
Hi all,
i got a programm like this:
import java.io.*;
import java.net.*;
class Whois
{
public static void main(String args[]) throws Exception
{
int c;
Socket s = new Socket("internic.net", 43);
InputStream in = s.getInputStream ();
System.out.println (in);
OutputStream out = s.getOutputStream ();
System.out.println (out);
String str = (args.length == 0 ? "osborne.com" : args[0]) + "\n";
byte buf[] = str.getBytes ();
out.write (buf);
while((c = in.read()) != -1)
{
System.out.print ((char) c);
}
s.close ();
}
}
but how can i unterstand the first two lines in the output:
java.net.SocketInputStream@19298d
java.net.SocketOutputStream@8a992f
what means the IDs "@19298d" and "@8a992f"?
regards
Zhilei Ma
Technical Details
Message-ID:
<3cf7483a$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!news-xfer.siscom.net!yellow.newsread.com!netaxs.com!newsread.com!news-out.newsfeeds.com!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,bd515b267b76cac1,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-05-31 03:00:47 PST Reply-To: "Zhilei Ma" <ma_zhilei@web.de> From: "Zhilei Ma" <ma_zhilei@web.de> Newsgroups: borland.public.jbuilder.java.api Subject: about a socket programm Date: Fri, 31 May 2002 11:54:01 +0200 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 129.69.164.17 Message-ID: <3cf7483a$1_2@dnews> X-Trace: dnews 1022838842 129.69.164.17 (31 May 2002 02:54:02 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!news-xfer.siscom.net!yellow.newsread.com!netaxs.com!newsread.com!news-out.newsfeeds.com!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews