Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## phelps.net
Class URLs

    java.lang.Object
      phelps.net.URLs

public class URLs
extends java.lang.Object

URL-related utility classes.

- `toURI(URL)`

Version:
  $Revision: 1.4 $ $Date: 2003/06/01 08:16:57 $

Method Summary
`static java.net.URI` | `toURI(java.net.URL url)` With `URI#toURL(URI)`, safe interconversion between URI and URL, working around Java bugs.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### toURI

    public static java.net.URI toURI(java.net.URL url)
                              throws java.net.URISyntaxException

  With `URI#toURL(URI)`, safe interconversion between URI and URL, working around Java bugs.
  - URI.create() and new URI(String) go boom if path has space
  - Java URI doesn't recognize the URLs obtained from resources in JAR (protocol `jar:file`) -- treats scheme as `jar` and ssp as opaque
  Note also that File.toURL().getPath() is buggy if file contains a '#' [as of Java 1.4].

  Throws:
    `java.net.URISyntaxException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD