Package io.lettuce.core
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 aInputStream
representing a resource. The resultingInputStream
must be closed by the calling code.- Since:
- 5.3
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static SslOptions.Resource
from(File file)
static SslOptions.Resource
from(URL url)
InputStream
get()
Obtains theInputStream
.
-
-
-
Method Detail
-
from
static SslOptions.Resource from(URL url)
- Parameters:
url
- the URL to obtain theInputStream
from.- Returns:
- a
SslOptions.Resource
that opens a connection to the URL and obtains theInputStream
for it.
-
from
static SslOptions.Resource from(File file)
- Parameters:
file
- the File to obtain theInputStream
from.- Returns:
- a
SslOptions.Resource
that obtains theFileInputStream
for the givenFile
.
-
get
InputStream get() throws IOException
Obtains theInputStream
.- Returns:
- the
InputStream
. - Throws:
IOException
-
-