## Uses of Class
java.net.MalformedURLException

- Packages that use MalformedURLException
  Package | Description
  --- | ---
  java.io |
  java.net |

- - ### Uses of MalformedURLException in java.io

    Methods in java.io that throw MalformedURLException
    Modifier and Type | Method and Description
    --- | ---
    `URL` | File.`toURL()` Deprecated. This method does not automatically escape characters that are illegal in URLs. It is recommended that new code convert an abstract pathname into a URL by first converting it into a URI, via the `toURI` method, and then converting the URI into a URL via the `URI.toURL` method.

  - ### Uses of MalformedURLException in java.net

    Methods in java.net that throw MalformedURLException
    Modifier and Type | Method and Description
    --- | ---
    `URL` | URI.`toURL()` Constructs a URL from this URI.

    Constructors in java.net that throw MalformedURLException
    Constructor and Description
    `URL(String spec)` Creates a `URL` object from the `String` representation.
    `URL(String protocol, String host, int port, String file)` Creates a `URL` object from the specified `protocol`, `host`, `port` number, and `file`.
    `URL(String protocol, String host, int port, String file, URLStreamHandler handler)` Creates a `URL` object from the specified `protocol`, `host`, `port` number, `file`, and `handler`.
    `URL(String protocol, String host, String file)` Creates a URL from the specified `protocol` name, `host` name, and `file` name.
    `URL(URL context, String spec)` Creates a URL by parsing the given spec within a specified context.
    `URL(URL context, String spec, URLStreamHandler handler)` Creates a URL by parsing the given spec with the specified handler within a specified context.

Copyright © 2025 API Design. All Rights Reserved.