Reading file at a given offset on a web server

S

sb5309

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.
 
C

Carl

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...
 
S

Sanny

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

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
 

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,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top