• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to subclass URLConnection?  RSS feed

 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to extend Java's URL handling so that it will handle my own custom protocol. I have got as far as registering my URLStreamHandler, so that Java will call my openConnection() method, when it encounters a URL with my protocol. But what to do now?

It looks like I need to return a subclass of URLConnection. However, that class has some of the least helpful javadoc I have ever seen in the JDK. It certainly says almost nothing about how to subclass it.

Can anyone point me to any articles or examples that will help me to do the right thing?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!