当前页面:
在线文档首页 >
JBOSS Portal 2.4 API 英文版文档
URLTools - JBOSS Portal 2.4 API 英文版文档
org.jboss.portal.common.util
Class URLTools
java.lang.Object
org.jboss.portal.common.util.URLTools
- public class URLTools
- extends java.lang.Object
- Since:
- 2.4 (May 26, 2006)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RE_EMAIL_VALIDATION
public static final java.lang.String RE_EMAIL_VALIDATION
- See Also:
- Constant Field Values
HTTP_PREFIX
public static final java.lang.String HTTP_PREFIX
- See Also:
- Constant Field Values
HTTPS_PREFIX
public static final java.lang.String HTTPS_PREFIX
- See Also:
- Constant Field Values
FILE_PREFIX
public static final java.lang.String FILE_PREFIX
- See Also:
- Constant Field Values
URLTools
public URLTools()
isURLAbsolute
public static boolean isURLAbsolute(java.lang.String url)
enforceAbsoluteURL
public static void enforceAbsoluteURL(java.lang.String url)
throws java.lang.IllegalArgumentException
- Enforces that the given URL is absolute
- Parameters:
url
- the String representation of the URL to be checked
- Throws:
java.lang.IllegalArgumentException
- if the given URL is not absolute
encodeXWWWFormURL
public static java.lang.String encodeXWWWFormURL(java.lang.String s)
decodeXWWWFormURL
public static java.lang.String decodeXWWWFormURL(java.lang.String s)
isEmailValid
public static boolean isEmailValid(java.lang.String address)
- Return true is the address is not null and matches the email validation regular expression.
exists
public static boolean exists(java.net.URL url)
extractURLsFrom
public static URLTools.URLMatch[] extractURLsFrom(java.lang.String markup)
getURLCountIn
public static int getURLCountIn(java.lang.String markup)
replaceURLsBy
public static java.lang.String replaceURLsBy(java.lang.String markup,
java.lang.String[] replacements)
replaceURLsBy
public static java.lang.String replaceURLsBy(java.lang.String markup,
URLTools.URLReplacementGenerator generator)