Reading file at a given offset on a web server

Discussion in 'Java' started by sb5309@yahoo.com, Mar 5, 2008.

  1. Guest

    Assume there is a file on a web server (linux), name "abc.dat".

    The file can be reached via: http://www.domain123.com/abc.dat

    There is no server side script or java program.


    Question
    --------

    Use a client side script/program, how to get the server to read the
    file "abc.dat" at a given offset and return the data ?


    Thanks.
     
    , Mar 5, 2008
    #1
    1. Advertising

  2. Carl Guest

    writes:

    > Assume there is a file on a web server (linux), name "abc.dat".
    >
    > The file can be reached via: http://www.domain123.com/abc.dat
    >
    > There is no server side script or java program.
    >
    >
    > Question
    > --------
    >
    > Use a client side script/program, how to get the server to read the
    > file "abc.dat" at a given offset and return the data ?
    >
    >
    > Thanks.



    Interesting, As I just posted this link on another thread...

    Start here:
    http://java.sun.com/docs/books/tutorial/networking/urls/index.html
    http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html

    Hope that helps.

    P.S. This sounds an awful lot like homework...
     
    Carl, Mar 5, 2008
    #2
    1. Advertising

  3. Sanny Guest

    On Mar 5, 6:04 am, wrote:
    > Assume there is a file on a web server (linux), name "abc.dat".
    >
    > The file can be reached via:http://www.domain123.com/abc.dat
    >
    > There is no server side script or java program.
    >
    > Question
    > --------
    >
    > Use a client side script/program, how to get the server to read the
    > file "abc.dat" at a given offset and return the data ?


    Do you want the Client to access "abc.dat"? Then you can get access to
    the file throgh networking.

    Incase of Applet use Connection conn= MYURL.getConnection...

    And somewhere define MYURL = new URL(http://www.domain123.com/
    abc.dat);

    Read all the file using read() command.

    Go through the syntaxes. I never recall the correct Syntax. As I use
    both C/ Java and I sometimes confuse about whether this command is
    used in C or in Java. As Both use simmilar structures.

    Bye
    Sanny

    Looking for Experts: http://www.getclub.com/Experts.php
     
    Sanny, Mar 5, 2008
    #3
    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. Lord0
    Replies:
    1
    Views:
    581
    Thomas Weidenfeller
    Apr 19, 2006
  2. Lance Riedel

    Translated Offset to Source Offset

    Lance Riedel, Oct 14, 2003, in forum: XML
    Replies:
    2
    Views:
    516
    Patrick TJ McPhee
    Oct 15, 2003
  3. chiara
    Replies:
    6
    Views:
    490
    Barry Schwarz
    Oct 6, 2005
  4. 2Barter.net
    Replies:
    0
    Views:
    380
    2Barter.net
    Dec 13, 2006
  5. Roy Smith
    Replies:
    4
    Views:
    291
    Roy Smith
    Jan 27, 2013
Loading...

Share This Page