java.lang.Object
dev.eidentification.bankid.client.utils.ResourceUtils

public final class ResourceUtils extends Object
  • Method Details

    • tryInputStreamFrom

      public static InputStream tryInputStreamFrom(String resourceName)
      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

      public static Optional<InputStream> optionalUriFrom(String resourceName)
      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