Package VASSAL.tools

Class URLUtils

java.lang.Object
VASSAL.tools.URLUtils

public class URLUtils extends Object
Since:
3.1.0
Author:
Joel Uckelman
  • Method Details

    • toURL

      public static URL toURL(String f) throws MalformedURLException
      Returns a URL corresponding to a file.
      Parameters:
      f - the file for which the URL is wanted
      Returns:
      the URL of the file
      Throws:
      MalformedURLException - if the URL can't be created
    • toURL

      public static URL toURL(File f) throws MalformedURLException
      Returns a URL corresponding to a file.
      Parameters:
      f - the file for which the URL is wanted
      Returns:
      the URL of the file
      Throws:
      MalformedURLException - if the URL can't be created
    • toJarURL

      public static URL toJarURL(String f) throws MalformedURLException
      Returns a URL corresponding to a JAR file.
      Parameters:
      f - the JAR file for which the URL is wanted
      Returns:
      the URL of the JAR file
      Throws:
      MalformedURLException - if the URL can't be created
    • toJarURL

      public static URL toJarURL(File f) throws MalformedURLException
      Returns a URL corresponding to a JAR file.
      Parameters:
      f - the JAR file for which the URL is wanted
      Returns:
      the URL of the JAR file
      Throws:
      MalformedURLException - if the URL can't be created