Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > apache commons net nntpclient and photo attachment

Reply
Thread Tools

apache commons net nntpclient and photo attachment

 
 
Jason (Kusanagihk)
Guest
Posts: n/a
 
      10-01-2008
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???
 
Reply With Quote
 
 
 
 
Ian Shef
Guest
Posts: n/a
 
      10-01-2008
"Jason (Kusanagihk)" <(E-Mail Removed)> wrote in news:e47d823e-fd26-491a-
http://www.velocityreviews.com/forums/(E-Mail Removed):

> 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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commons Net from Apache PaowZ Java 2 11-19-2008 02:34 PM
Apache commons net 1.4.1 FTPClient reliability Christopher Benson-Manica Java 0 09-20-2007 10:04 PM
Question about News::NNTPClient Fred Perl Misc 1 02-25-2007 07:13 PM
Apache FileUpload - java.lang.NoClassDefFoundError: org/apache/commons/io/FileCleaner kebabkongen@hotmail.com Java 2 03-16-2006 09:20 AM
NNTPClient Question Gurdeep Saini Perl 1 11-12-2004 07:51 PM



Advertisments