The Artima Developer Community
Sponsored Link

Java Answers Forum
URLConnection openConnection

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ann

Posts: 1
Nickname: skissa
Registered: Mar, 2003

URLConnection openConnection Posted: Mar 31, 2003 12:46 PM
Reply to this message Reply
Advertisement
Hi!
I am implementing openConnection(URL url)

public URLConnection openConnection(URL url) throws IOException
{
ClassLoader loader = new V4ClassLoader();//use my classLoader
String file = url.getFile();
if (file.charAt(0) == '/')
file = file.substring(1);
URL resource = loader.getResource(file);
URLConnection connection = null;
try
{
if (resource != null)
connection = resource.openConnection();
}
catch(Exception e){}//throw new FileNotFoundException(file);
return connection;
}

Then I am running program, I get stack in infinite loop.
Line connection = resource.openConnection(); calls openConnection(URL url). I don?t understand how it can be. Is there someone who can help me !!!!!! (:
Thanks

Topic: help in CACHING using Java Previous Topic   Next Topic Topic: Deprecated components, any easy solutions to this prob?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use