apache commons net nntpclient and photo attachment

  • Thread starter Jason (Kusanagihk)
  • Start date
J

Jason (Kusanagihk)

Hi all,

I am trying to write a module to download attachments (most probably
photo attachments) from a NNTP server

I have chosen to use apache commons-net package, and seems ok, but
have no idea how to get the attachments; the retrieveArticleBody
method returns only a Reader object....

any idea???
 
I

Ian Shef

Hi all,

I am trying to write a module to download attachments (most probably
photo attachments) from a NNTP server

I have chosen to use apache commons-net package, and seems ok, but
have no idea how to get the attachments; the retrieveArticleBody
method returns only a Reader object....

any idea???

I am not familiar with apache commons-net, but...

I would expect that you would use the Reader object to obtain the text of the
article, using:
read() to obtain a character at a time.
read(char[] cbuf) to obtain a chunk of characters at a time.
ready() to determine whether characters are available (optional).
close() when you are done.

The text would have to be parsed to find the attachments, and then would need
to be decoded.

I hope that this helps.

Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top