org.apache.myfaces.trinidad.util

## Class URLUtils

- java.lang.Object
- - org.apache.myfaces.trinidad.util.URLUtils

-     public final class URLUtils
      extends Object

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `encodeURL(String url, Map<String,List<String>> params, String characterResponseEncoding)` Encodes a URL (with or without an existing query string) such that the value in the params map are added to them.
    `static long` | `getLastModified(URL url)`
    `static long` | `getLastModified(URLConnection connection)`
    `static String` | `jsEncodeURL(String url, String charset)` Takes a URL that is not escaped for javascript and escapes it

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getLastModified

          public static long getLastModified(URL url)
                                      throws IOException

      Throws:
        `IOException`

    - #### getLastModified

          public static long getLastModified(URLConnection connection)
                                      throws IOException

      Throws:
        `IOException`

    - #### jsEncodeURL

          public static String jsEncodeURL(String url,
                           String charset)
                                    throws UnsupportedEncodingException

      Takes a URL that is not escaped for javascript and escapes it
      Throws:
        `UnsupportedEncodingException`

    - #### encodeURL

          public static String encodeURL(String url,
                         Map<String,List<String>> params,
                         String characterResponseEncoding)

      Encodes a URL (with or without an existing query string) such that the value in the params map are added to them. A valid character encoding must be provided to ensure the parameters are encoded properly.
      Parameters:
        `url` - the base URL
        `params` - the map of parameters to add, or `null`
        `characterResponseEncoding` - the character response encoding
      Returns:
        the properly encoded url
      Throws:
        `UnsupportedOperationException` - if the encoding is not supported.

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.