- 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.- Since:
- 5.3
-
Method Summary
Modifier and Type Method Description static SslOptions.Resourcefrom(File file)static SslOptions.Resourcefrom(URL url)InputStreamget()Obtains theInputStream.
-
Method Details
-
from
- Parameters:
url- the URL to obtain theInputStreamfrom.- Returns:
- a
SslOptions.Resourcethat opens a connection to the URL and obtains theInputStreamfor it.
-
from
- Parameters:
file- the File to obtain theInputStreamfrom.- Returns:
- a
SslOptions.Resourcethat obtains theFileInputStreamfor the givenFile.
-
get
Obtains theInputStream.- Returns:
- the
InputStream. - Throws:
IOException
-