org.thymeleaf.util
Class UrlUtils

Object
  extended by org.thymeleaf.util.UrlUtils

public final class UrlUtils
extends Object

General utilities for URI/URLs.

Since:
2.1.3
Author:
Daniel Fernández

Method Summary
static String encodePath(String path)
           Encodes the given String as a section of a URL path.
static String encodePathSegment(String pathSegment)
           Encodes the given String as a segment of a URL path.
static String encodeQueryParam(String queryParam)
           Encodes the given URL query parameter, using the 'UTF-8' encoding.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encodeQueryParam

public static String encodeQueryParam(String queryParam)

Encodes the given URL query parameter, using the 'UTF-8' encoding.

Parameters:
queryParam - the query parameter to be encoded
Returns:
the encoding result

encodePath

public static String encodePath(String path)

Encodes the given String as a section of a URL path. This section might include '/' level separators, which will be kept.

Parameters:
path - the path to be encoded
Returns:
the encoding result

encodePathSegment

public static String encodePathSegment(String pathSegment)

Encodes the given String as a segment of a URL path. This section cannot include '/' level separators, so any instances of this char will be encoded.

Parameters:
pathSegment - the path segment to be encoded
Returns:
the encoding result


Copyright © 2014 The THYMELEAF team. All Rights Reserved.