private String getSigAlg() {
    String sigAlg = "MD5withRSA";
    FileInputStream in;
    try {
      if (serverConfiguration != null) {
        String keystoreFile = serverConfiguration.getKeystore();
        if (keystoreFile != null) {
          in = new FileInputStream(keystoreFile);

          KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
          String keystorePassword = serverConfiguration.getKeystorePassword();
          char[] keystorePasswordCharArray = (keystorePassword == null)
                                             ? null : keystorePassword.toCharArray();
          if (keystorePasswordCharArray == null) {
            throw new RuntimeException("No keystore password configured.");
          }
          keystore.load(in, keystorePasswordCharArray);
          cert509 =
              (X509Certificate) keystore.getCertificate(serverConfiguration.getKeystoreAlias());
          sigAlg = cert509.getSigAlgName();
        }
      }
    } catch (Exception e) {
      log.log(Level.WARNING, String.format(
          "Error getting signature algorithm for jarsigner. Defaulting to %s. Reason: %s", sigAlg, e.getMessage()));
    }
    return sigAlg;
  }
Loads resources as stream and the main reason for having the method is because it can be use
while testing and in production for loading files from within jar file.

@param resource The resource to load.
@return The input stream of the resource.
@throws SelendroidException if resource was not found.
selendroid-standalone/src/main/java/io/selendroid/standalone/builder/SelendroidServerBuilder.java