Class BomUtils


  • public final class BomUtils
    extends java.lang.Object
    • Constructor Detail

      • BomUtils

        private BomUtils()
    • Method Detail

      • calculateHashes

        public static java.util.List<Hash> calculateHashes​(java.io.File file,
                                                           Version schemaVersion)
                                                    throws java.io.IOException
        Calculates the hashes of the specified file.
        Parameters:
        file - the File to calculate hashes on
        schemaVersion - enum denoting the schema version in use. Affects hash algorithm selection.
        Returns:
        a List of Hash objets
        Throws:
        java.io.IOException - an IOException
        Since:
        1.0.0
      • toAlgorithm

        private static Hash.Algorithm toAlgorithm​(java.security.MessageDigest digest)
      • validateUrlString

        @Deprecated
        public static boolean validateUrlString​(java.lang.String url)
        Deprecated.
      • validateUriString

        public static boolean validateUriString​(java.lang.String uri)