URL the final class

There is a protected method "set" in a final class of java.net.URL. How one can access it? I wanted to switch between the different "reference" of a HTML file.
[180 byte] By [ankale] at [2007-9-26 2:51:52]
# 1
As the Javadoc for the API says, it is protected so that only URLStreamHandlers can access it. You could consider extending that.
KPSeal at 2007-6-29 10:39:27 > top of Java-index,Archived Forums,Java Programming...
# 2

Create a URL object using any of the constructor. eg.:- URL url=new URL("http://server/index.html"); To set the fields of the URL, use the set() method as follows: - url.set(protocol,host,port,file,ref); The set() method has following syntax:- protected void set(String protocol, String host, int port, String file, String ref) where protocol - the name of the protocol to use host - the name of the host port - the port number on the host file - the file on the host ref - the internal reference in the URL

kmsr1 at 2007-6-29 10:39:27 > top of Java-index,Archived Forums,Java Programming...