Hi Daniel
I'm not quite sure what the problem is here - are you saying that the
header values are incorrect for large article retrievals?
Rory
Daniel Penning wrote:
Hello,
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?
My source code to receive the header: (client is an open and authed
nntp-Client)
ArrayList<Header> headers = new ArrayList<Header>();
DotTerminatedMessageReader reader =
(DotTerminatedMessageReader)
client.retrieveArticleInfo((int)rangeFrom,
(int)rangeTo);
BufferedReader stringReader = new
BufferedReader(reader);
String line = null;
String[] header = new String[6];
while((line = stringReader.readLine()) != null)
{
try
{
header = line.split("\t");
int number = Integer.parseInt(header[0]);
String subject = header[1];
String author = header[2];
Date date = this.parseDate(header[3]);
String messageID = header[4];
int size = Integer.parseInt(header[6]);
headers.add(new Header(number, subject,
author, date.getTime()/1000, size, messageID, parser));
}
catch (Exception e)
{
// exception handling...
}
}
Now I am sorting my header-objects and finally got a lot of duplicates,
as described.
Is there any mistake in my code?
Kind regards, D.Penning
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]