commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thufir <>
Subject Re: NNTPClient.retrieveArticleBody returns MalformedServerReplyException
Date Mon, 26 Mar 2012 14:23:13 GMT
On 03/26/2012 06:06 AM, sebb wrote:
> Try NNTPClient.retrieveArticle(long articleNumber, ArticleInfo
> pointer)  and NNTPClient.retrieveArticle(long articleNumber)

Both of those return with MalformedServerReplyException for me, as before.

I notice that Article API says, about Article, that:

This is a class that contains the basic state needed for message 
retrieval and threading. With thanks to Jamie Zawinski

So, the message body is not in the Article, I don't think.  Maybe I'm 
misunderstanding the docs.  My reading is that some variant of 
NNTPClient.retrieveBody will return the body.

However, there's a note that:

"A DotTerminatedMessageReader is returned from which the article can be 
read. If the article does not exist, null is returned.

You must not issue any commands to the NNTP server (i.e., call any other 
methods) until you finish reading the message from the returned 
BufferedReader instance. The NNTP protocol uses the same stream for 
issuing commands as it does for returning results. Therefore the 
returned BufferedReader actually reads directly from the NNTP 
connection. After the end of message has been reached, new commands can 
be executed and their replies read. If you do not follow these 
requirements, your program will not work properly. "

throughout the NNTPClient documentation, for many methods.

That being said, there are zero examples of retrieving the message body. 
  Maybe it's a completely different approach then retrieving Articles?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message