apache commons net nntpclient and photo attachment

Discussion in 'Java' started by Jason (Kusanagihk), Oct 1, 2008.

  1. 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???
    Jason (Kusanagihk), Oct 1, 2008
    #1
    1. Advertising

  2. Jason (Kusanagihk)

    Ian Shef Guest

    "Jason (Kusanagihk)" <> wrote in news:e47d823e-fd26-491a-
    :

    > 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!
    Ian Shef, Oct 1, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gurdeep Saini

    NNTPClient Question

    Gurdeep Saini, Nov 11, 2004, in forum: Perl
    Replies:
    1
    Views:
    517
    Anthony Papillion II
    Nov 12, 2004
  2. RC
    Replies:
    2
    Views:
    455
    John M Deal
    Nov 24, 2004
  3. Replies:
    2
    Views:
    13,719
  4. Christopher Benson-Manica

    Apache commons net 1.4.1 FTPClient reliability

    Christopher Benson-Manica, Sep 20, 2007, in forum: Java
    Replies:
    0
    Views:
    494
    Christopher Benson-Manica
    Sep 20, 2007
  5. Fred

    Question about News::NNTPClient

    Fred, Feb 25, 2007, in forum: Perl Misc
    Replies:
    1
    Views:
    96
    Brian McCauley
    Feb 25, 2007
Loading...

Share This Page