com.opensymphony.xwork2.util
Class URLUtil

java.lang.Object
  extended by com.opensymphony.xwork2.util.URLUtil

public class URLUtil
extends Object

Helper class to extract file paths from different urls


Field Summary
static String JBOSS5_VFSMEMORY
           
static String JBOSS5_VFSZIP
          Prefix for Jar files in JBoss Virtual File System
 
Constructor Summary
URLUtil()
           
 
Method Summary
static boolean isJarURL(URL fileUrl)
          Check if given URL is matching Jar pattern for different servers
static boolean isJBoss5Url(URL fileUrl)
          Check if given URL is pointing to JBoss 5 VFS resource
static URL normalizeToFileProtocol(URL url)
          Convert URLs to URLs with "file" protocol
static boolean verifyUrl(String url)
          Verify That the given String is in valid URL format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JBOSS5_VFSZIP

public static final String JBOSS5_VFSZIP
Prefix for Jar files in JBoss Virtual File System

See Also:
Constant Field Values

JBOSS5_VFSMEMORY

public static final String JBOSS5_VFSMEMORY
See Also:
Constant Field Values
Constructor Detail

URLUtil

public URLUtil()
Method Detail

normalizeToFileProtocol

public static URL normalizeToFileProtocol(URL url)
Convert URLs to URLs with "file" protocol

Parameters:
url - URL to convert to a jar url
Returns:
a URL to a file, or null if the URL external form cannot be parsed

verifyUrl

public static final boolean verifyUrl(String url)
Verify That the given String is in valid URL format.

Parameters:
url - The url string to verify.
Returns:
a boolean indicating whether the URL seems to be incorrect.

isJarURL

public static boolean isJarURL(URL fileUrl)
Check if given URL is matching Jar pattern for different servers

Parameters:
fileUrl -
Returns:

isJBoss5Url

public static boolean isJBoss5Url(URL fileUrl)
Check if given URL is pointing to JBoss 5 VFS resource

Parameters:
fileUrl -
Returns:


Copyright © 2009 OpenSymphony. All Rights Reserved.