Class ResolverHelper


  • public final class ResolverHelper
    extends Object
    Helper methods for (OIDC) metadata resolution classes. Based on FilesystemMetadataResolver and its parent classes.
    • Constructor Detail

      • ResolverHelper

        private ResolverHelper()
        Constructor.
    • Method Detail

      • inputstreamToByteArray

        public static byte[] inputstreamToByteArray​(@Nonnull
                                                    InputStream ins)
                                             throws ResolverException
        Converts an InputStream into a byte array.
        Parameters:
        ins - input stream to convert
        Returns:
        resultant byte array
        Throws:
        ResolverException - thrown if there is a problem reading the resultant byte array
      • validateMetadataFile

        public static void validateMetadataFile​(@Nonnull
                                                File file)
                                         throws ResolverException
        Validate the basic properties of the specified metadata file, for example that it exists; that it is a file; and that it is readable.
        Parameters:
        file - the file to evaluate
        Throws:
        ResolverException - if file does not pass basic properties required of a metadata file