Interface Scheme


public interface Scheme
The scheme component of a URL.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Scheme
     
    static final Scheme
     
    static final Scheme
    The scheme can be used to access resources located inside a JAR file.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns a string that represents the name of the scheme.
    static Scheme
    of(String name)
    Returns the Scheme instance for the given name.
  • Field Details

    • HTTP

      static final Scheme HTTP
    • HTTPS

      static final Scheme HTTPS
    • JAR

      static final Scheme JAR
      The scheme can be used to access resources located inside a JAR file.

      The JAR scheme will be treated as the standard "https" scheme.

      By default, the URL to a resource located inside a JAR file has the "jar:file:" scheme which is treated as a non-standard scheme such as "jar:file:/path/*.jar!/path/resource.file". So, it will be canonicalized to the "jar://file/path/*.jar!/path/resource.file" form.

  • Method Details

    • of

      static Scheme of(String name)
      Returns the Scheme instance for the given name.
      Throws:
      IllegalArgumentException - when the name is empty of blank
      Implementation Note:
      The given scheme name will be converted to lower case using String.toLowerCase().
    • name

      default String name()
      Returns a string that represents the name of the scheme.