Class URLValidator

java.lang.Object
org.springframework.ai.bedrock.converse.api.URLValidator

public final class URLValidator extends Object
Utility class for detecting and normalizing URLs. Intended for use with multimodal user inputs.
Since:
1.0.0
Author:
Christian Tzolov
  • Method Details

    • isValidURLBasic

      public static boolean isValidURLBasic(String urlString)
      Quick validation using regex pattern Good for basic checks but may not catch all edge cases
    • isValidURLStrict

      public static boolean isValidURLStrict(String urlString)
      Thorough validation using URL class More comprehensive but might be slower Validates protocol, host, port, and basic structure
    • normalizeURL

      public static String normalizeURL(String urlString)
      Attempts to fix common URL issues Adds protocol if missing, removes extra spaces