Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 91787 invoked from network); 3 Dec 2008 22:20:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2008 22:20:40 -0000 Received: (qmail 25584 invoked by uid 500); 3 Dec 2008 22:20:49 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 25533 invoked by uid 500); 3 Dec 2008 22:20:48 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 25521 invoked by uid 99); 3 Dec 2008 22:20:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 14:20:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of d.penning@fire-development.com designates 78.47.177.236 as permitted sender) Received: from [78.47.177.236] (HELO mail.fire-development.com) (78.47.177.236) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 22:19:20 +0000 Content-class: urn:content-classes:message Subject: AW: NNTP Client -> identical headers? MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 3 Dec 2008 23:19:39 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <215C90BFF6C79F4797048B9CB9A9915311E839@win2k3-03.intranet.lan> In-Reply-To: <49370446.9020001@eircom.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: NNTP Client -> identical headers? Thread-Index: AclVlIEfT0JB9MfGRJ2Vc19mn0Ao1wAAEP6g References: <215C90BFF6C79F4797048B9CB9A9915311E827@win2k3-03.intranet.lan> <49370446.9020001@eircom.net> From: "Daniel Penning" To: "Commons Users List" X-Virus-Checked: Checked by ClamAV on apache.org Hi Rory, I'm not sure if the header values are correct ;) I'm only wondering why = there are so much headers which are - as described - nearly identical in = their values. Is my way to parse the Stream into different headers a common way to do = this job? Thanks a lot, Daniel -----Urspr=FCngliche Nachricht----- Von: Rory Winston [mailto:rory.winston@gmail.com]=20 Gesendet: Mittwoch, 3. Dezember 2008 23:12 An: Commons Users List Betreff: Re: NNTP Client -> identical headers? Hi Daniel I'm not quite sure what the problem is here - are you saying that the=20 header values are incorrect for large article retrievals? Rory Daniel Penning wrote: > Hello, > > =20 > > I am trying to implement a nntp header parser with Jakarta Commons = Net. > The authentication and receiving of groups works well but I got = strange > results when I am trying to download a huge number (100.000) of = article > HEADER in a binary group. > > There are a lot of headers (approx. 10-20% which are identical in > subject, author and group. Only the size / header number / messageID > differs somewhat. > > Why could this happen? > > =20 > > My source code to receive the header: (client is an open and authed > nntp-Client) > > =20 > > ArrayList
headers =3D new = ArrayList
(); > > DotTerminatedMessageReader reader =3D > (DotTerminatedMessageReader) > > client.retrieveArticleInfo((int)rangeFrom, > (int)rangeTo); =20 > > BufferedReader stringReader =3D new > BufferedReader(reader); > > String line =3D null; > > String[] header =3D new String[6]; > > while((line =3D stringReader.readLine()) !=3D null) > > { > > try > > { > > header =3D line.split("\t"); > > int number =3D = Integer.parseInt(header[0]); > > String subject =3D header[1]; > > String author =3D header[2]; > > Date date =3D this.parseDate(header[3]); > > String messageID =3D header[4]; > > int size =3D Integer.parseInt(header[6]); > > headers.add(new Header(number, subject, > author, date.getTime()/1000, size, messageID, parser)); > > } > > catch (Exception e) > > { > > // exception handling... > > } > > } > > =20 > > Now I am sorting my header-objects and finally got a lot of = duplicates, > as described. > > Is there any mistake in my code? > > =20 > > Kind regards, D.Penning > > =20 > > =20 > > > =20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org