Module dev.eidentification.bankid
Class ResourceUtils
java.lang.Object
dev.eidentification.bankid.client.utils.ResourceUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional
<InputStream> optionalUriFrom
(String resourceName) Retrieves an optional input stream from the given resource name.static InputStream
tryInputStreamFrom
(String resourceName) Tries to retrieve an input stream from the given resource name.
-
Method Details
-
tryInputStreamFrom
Tries to retrieve an input stream from the given resource name.- Parameters:
resourceName
- the name of the resource to retrieve- Returns:
- the input stream of the resource
- Throws:
BankIdException
- if the resource could not be found or accessed
-
optionalUriFrom
Retrieves an optional input stream from the given resource name.- Parameters:
resourceName
- the name of the resource to retrieve- Returns:
- an optional input stream of the resource, or empty if the resource could not be found or accessed
-