Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

Reading file at a given offset on a web server

Thread view: 
sb5309@yahoo.com - 05 Mar 2008 01:04 GMT
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 - 05 Mar 2008 01:09 GMT
> Assume there is a file on a web server (linux), name "abc.dat".
>
[quoted text clipped - 9 lines]
>
> 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...
Sanny - 05 Mar 2008 08:03 GMT
On Mar 5, 6:04 am, sb5...@yahoo.com wrote:
> Assume there is a file on a web server (linux), name "abc.dat".
>
[quoted text clipped - 7 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.