| java.lang.Object com.tagtraum.framework.util.URLHelper
URLHelper | final public class URLHelper (Code) | | Helpermethods for URL-Handling.
TODO: Translate comments to English!
author: Hendrik Schreiber version: 1.1beta1 $Id: URLHelper.java,v 1.6 2005/03/15 21:47:12 hendriks73 Exp $ |
Method Summary | |
public static URL | encodeSpaces(URL url) Replaces all spaces in the URL with %20. | final public static String | getFile(URL aURL) Returns the filenhame. | final public static URL | make(String aDirtyURL) Translates a String to A URL. | final public static URL | make(URL aBaseURL, String aDirtyURL) Translates a String to A URL. | final public static URL | makeJarURL(URL aURL, String aFile) Returns an URL pointing at a jar file if the URL points at a file, i.e. | final public static URL | makeJarURL(URL aURL) Returns an URL pointing at a jar file if the URL points at a file, i.e. |
encodeSpaces | public static URL encodeSpaces(URL url) throws MalformedURLException(Code) | | Replaces all spaces in the URL with %20.
Parameters: url - URL to encode URL with %20 instead of spaces throws: MalformedURLException - if the encoded URL becomes invalid for some reason. |
getFile | final public static String getFile(URL aURL)(Code) | | Returns the filenhame. Makes sure we don't get filenames like /d:/somefile, but d:/somefile.
|
make | final public static URL make(String aDirtyURL) throws MalformedURLException(Code) | | Translates a String to A URL. If no protocol is given,
file: is used.
Parameters: aDirtyURL - zu transformierender String sauberer URL exception: MalformedURLException - falls der String nichtwohlgeformt war. |
make | final public static URL make(URL aBaseURL, String aDirtyURL) throws MalformedURLException(Code) | | Translates a String to A URL. If no protocol is given,
file: is used.
Parameters: aBaseURL - Basis-URL Parameters: aDirtyURL - zu transformierender String sauberer URL exception: MalformedURLException - falls der String nichtwohlgeformt war. |
makeJarURL | final public static URL makeJarURL(URL aURL, String aFile) throws MalformedURLException(Code) | | Returns an URL pointing at a jar file if the URL points at a file, i.e.
does not end with slash.
|
makeJarURL | final public static URL makeJarURL(URL aURL) throws MalformedURLException(Code) | | Returns an URL pointing at a jar file if the URL points at a file, i.e.
does not end with slash.
|
|
|