Interface SslOptions.Resource

  • Enclosing class:
    SslOptions
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface SslOptions.Resource
    Supplier for a InputStream representing a resource. The resulting InputStream must be closed by the calling code.
    • Method Detail

      • from

        static SslOptions.Resource from​(java.net.URL url)
        Create a SslOptions.Resource that obtains a InputStream from a URL.
        Parameters:
        url - the URL to obtain the InputStream from.
        Returns:
        a SslOptions.Resource that opens a connection to the URL and obtains the InputStream for it.
      • get

        java.io.InputStream get()
                         throws java.io.IOException
        Get the InputStream for the resource.
        Returns:
        the InputStream
        Throws:
        java.io.IOException - if the resource cannot be accessed