🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2052

Socket

#2052
From: Iannone
Date: Mon, 09 Jul 2001 21:45
10 lines
1502 bytes
Hi all,
I am a newbie in Java programming. I am writing a simple application that
uses java.net.Socket to connect to a Server.
I use a InputStream object to deal with Input from the Socket. How can I
predict how many byte are there in the Stream ready to be read with maybe
read method in a byte[]. I tried available() method but it gives me always
0.
Sure it is a trivial problem but can you help me?
Thanks and regards,
                                            Luigi
Technical Details
Message-ID: <aCp27.3205$1u2.125246@news.infostrada.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!nntp.infostrada.it!news.infostrada.it!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,a6023d6fd7aa0644,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-07-09 14:44:14 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!nntp.infostrada.it!news.infostrada.it!not-for-mail
From: "Iannone" <l.iannone@libero.it>
Newsgroups: borland.public.jbuilder.java.api
Subject: Socket
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <aCp27.3205$1u2.125246@news.infostrada.it>
Date: Mon, 09 Jul 2001 21:45:42 GMT
NNTP-Posting-Host: 151.14.37.113
X-Complaints-To: abuse@iol.it
X-Trace: news.infostrada.it 994715142 151.14.37.113 (Mon, 09 Jul 2001 23:45:42 MET DST)
NNTP-Posting-Date: Mon, 09 Jul 2001 23:45:42 MET DST
Organization: [Infostrada]