Name: boT120536 Date: 09/04/2001
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
The new java.net.URI class has a toURL() method.
Likewise, java.net.URI should have a toURI() method.
Since all URLs are URIs, this method won't throw any exceptions,
but make a URI out of a URI now you have to convert to a String,
then parse back, and all URI constructors throw an exception,
so you have to wrap all such conversions in a try/catch block.
(Review ID: 131229)
======================================================================
- duplicates
-
JDK-4701417 convenience method URL.toURI()
-
- Closed
-