Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 25509 invoked from network); 4 Dec 2008 22:21:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2008 22:21:27 -0000 Received: (qmail 80834 invoked by uid 500); 4 Dec 2008 22:21:35 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 80545 invoked by uid 500); 4 Dec 2008 22:21:34 -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 80534 invoked by uid 99); 4 Dec 2008 22:21:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2008 14:21:34 -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; Thu, 04 Dec 2008 22:20:04 +0000 Content-class: urn:content-classes:message Subject: AW: AW: NNTP Client -> identical headers? Date: Thu, 4 Dec 2008 23:20:23 +0100 Message-ID: <215C90BFF6C79F4797048B9CB9A9915311E864@win2k3-03.intranet.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In-Reply-To: <493798D8.6090808@eircom.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: X-MimeOLE: Produced By Microsoft Exchange V6.5 Thread-Topic: AW: NNTP Client -> identical headers? Thread-Index: AclWNFUzNopgGyxhSFar7dNtmhxHFgAKPLtA References: <215C90BFF6C79F4797048B9CB9A9915311E827@win2k3-03.intranet.lan> <49370446.9020001@eircom.net> <215C90BFF6C79F4797048B9CB9A9915311E839@win2k3-03.intranet.lan> <493798D8.6090808@eircom.net> From: "Daniel Penning" To: "Commons Users List" X-Virus-Checked: Checked by ClamAV on apache.org Hi Rory, ok thanks a lot for your reply. I will take a look to the NNTPUtils-Class and yes, it's a little bit = confusing that these methods are outsourced in another class ;) Yeah, there is a lot of automation when posting these headers but I'm = still wondering about so much duplicates. The fact is that these duplicates are not exactly equal, especial their = size differ for about 10-20 bytes. Is this size-variance maybe caused by = different message-id and so on or describes the size only the proper = value? My task is to parse the header information and create a set of headers = which can be downloaded later. So there is a problem if I don't know = which of the 2 (maybe more) duplicates is the correct header. Kind regards, Daniel -----Urspr=FCngliche Nachricht----- Von: Rory Winston [mailto:rory.winston@gmail.com]=20 Gesendet: Donnerstag, 4. Dezember 2008 09:46 An: Commons Users List Betreff: Re: AW: NNTP Client -> identical headers? Hi Daniel Your method looks correct - you are reading a bunch of tab-delimited=20 lines and parsing the header values from that, which is what the=20 NNTPUtils class does under the hood. You may find it easier to use the=20 NNTPUtils::getArticleInfo() method to retrieve the information that you=20 are currently parsing manually. I should move that class from the=20 examples package to make that easier. Possibly the reason for so much duplication is (if it is a binary=20 newsgroup) articles being posted by an automated process. Rory Daniel Penning wrote: > 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: > =20 >> 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 >> =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 > > > > > =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