Can I cast the return object from URL.openConnection() to an HttpURLConnection in an applet?

John Zukowski

Unfortunately, you can't. Both IE and NN version 4 and below return objects whose type is not HttpURLConnection or a subclass thereof.

Strictly speaking openConnection() is only guaranteed to return an object whose type is URLConnection, although for Java 1.3 the documentation implies that the type will be a HttpURLConnection.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact