Package redis.clients.jedis
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.ResourceSupplier for aInputStreamrepresenting a resource. The resultingInputStreammust be closed by the calling code.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static SslOptions.Resourcefrom(java.io.File file)static SslOptions.Resourcefrom(java.net.URL url)java.io.InputStreamget()Get theInputStreamfor the resource.
-
-
-
Method Detail
-
from
static SslOptions.Resource from(java.net.URL url)
- Parameters:
url- the URL to obtain theInputStreamfrom.- Returns:
- a
SslOptions.Resourcethat opens a connection to the URL and obtains theInputStreamfor it.
-
from
static SslOptions.Resource from(java.io.File file)
- Parameters:
file- the File to obtain theInputStreamfrom.- Returns:
- a
SslOptions.Resourcethat obtains theFileInputStreamfor the givenFile.
-
get
java.io.InputStream get() throws java.io.IOExceptionGet theInputStreamfor the resource.- Returns:
- the
InputStream - Throws:
java.io.IOException- if the resource cannot be accessed
-
-