W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 2000

Prolem in downloading a file

From: Edison Aspert <aspertedison@yahoo.com>
Date: Fri, 15 Dec 2000 13:57:40 -0800 (PST)
Message-ID: <20001215215740.5100.qmail@web3905.mail.yahoo.com>
To: www-jigsaw@w3.org
Hi,

I am trying to download a file using the Jigsaw API.

Here is the code

HttpManager manager = HttpManager.getManager() ;
Request request = manager.createRequest() ;
request.setMethod("GET") ;
request.setURL(new URL("http://www.cel.com/"));
Reply    reply = manager.runRequest(request) ;
// Get the reply input stream that contains the actual
data:
InputStream in = reply.getInputStream() ;
System.out.println("Code "+reply.getStatus());
//printing 302
BufferedReader bufferedReader = new BufferedReader(new
InputStreamReader(in));
String inputLine;
while ((inputLine = bufferedReader.readLine()) !=
null)
{
	System.out.println(inputLine);
	//writing to a file
}
System.out.println("Reason "+reply.getReason());

For the url http://www.cel.com/ I am getting the
message
"Moved Temporarily" which is not correct.

Please help me.

Thanks in Advance.

Aspert Edison

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
Received on Friday, 15 December 2000 16:57:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:34 GMT