Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Reading file at a given offset on a web server (http://www.velocityreviews.com/forums/t596093-reading-file-at-a-given-offset-on-a-web-server.html)

sb5309@yahoo.com 03-05-2008 01:04 AM

Reading file at a given offset on a web server
 

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.

Carl 03-05-2008 01:09 AM

Re: Reading file at a given offset on a web server
 
sb5309@yahoo.com 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/tutor...rls/index.html
http://java.sun.com/docs/books/tutor...eadingURL.html

Hope that helps.

P.S. This sounds an awful lot like homework...

Sanny 03-05-2008 08:03 AM

Re: Reading file at a given offset on a web server
 
On Mar 5, 6:04*am, sb5...@yahoo.com 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




All times are GMT. The time now is 09:46 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.