Class CamelURIParser


  • public final class CamelURIParser
    extends Object
    A Camel specific URI parser that parses endpoint URIs in a quasi syntax that Camel uses. The URI is much slower and parses endpoint URIs into additional parts which Camel does not use or need.
    • Method Detail

      • fastParseUri

        public static String[] fastParseUri​(String uri)
        Parses the URI (in fast mode). If this parser cannot parse the uri then null is returned. And instead the follow code can be used:
         URI u = new URI(UnsafeUriCharactersEncoder.encode(uri, true));
         
        Parameters:
        uri - the uri
        Returns:
        null if not possible to parse, if the uri is already normalized, then URI_ALREADY_NORMALIZED is returned, or an array[3] with scheme,path,query
      • parseUri

        public static String[] parseUri​(String uri)
        Parses the URI. If this parser cannot parse the uri then null is returned. And instead the follow code can be used:
         URI u = new URI(UnsafeUriCharactersEncoder.encode(uri, true));
         
        Parameters:
        uri - the uri
        Returns:
        null if not possible to parse, or an array[3] with scheme,path,query