Network I/O performance

Discussion in 'Java' started by Jo Demol, Jun 1, 2004.

  1. Jo Demol

    Jo Demol Guest

    Hi,

    I have a question about java network io. The problem is the following:
    I have an ftp server with an acii file and I want to read the last
    line from this file without transferring the complete file. Is this
    possible? Because all my tests up till now seem to transfer the file
    before processing it.

    Your help is highly appreciated,

    Jo
    Jo Demol, Jun 1, 2004
    #1
    1. Advertising

  2. On 1 Jun 2004 02:34:11 -0700, Jo Demol wrote:
    > I have a question about java network io. The problem is the
    > following: I have an ftp server with an acii file and I want to read
    > the last line from this file without transferring the complete file.
    > Is this possible? Because all my tests up till now seem to transfer
    > the file before processing it.


    You've posted no information to show how you've attempted to retrieve
    the last line, so it's impossible to say what you've done wrong. Also,
    it's unclear from your post how this issue relates to Java
    programming.

    If your FTP server supports REST and you know how large the file is,
    then you could start the transfer near the end. Or you could implement
    a feature on the FTP server to help you retrieve the last line only,
    then use the SITE command to execute it.

    If you don't have to use FTP, you might find that there are easier
    ways to get the last line, for example this shell command:

    rsh serverhost tail -1 file

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
    Gordon Beaton, Jun 1, 2004
    #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. Kal
    Replies:
    1
    Views:
    9,502
    Kevin Spencer
    Jun 21, 2004
  2. Jane Davis

    Network Service account over network

    Jane Davis, Jun 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    428
    Kevin Spencer
    Jun 22, 2005
  3. Bill Volk
    Replies:
    1
    Views:
    3,131
    Bill Volk
    Jul 2, 2003
  4. kin
    Replies:
    0
    Views:
    909
  5. king
    Replies:
    1
    Views:
    265
Loading...

Share This Page