org.apache.fop.tools
Class URLBuilder
java.lang.Object
org.apache.fop.tools.URLBuilder
- public class URLBuilder
- extends Object
This utility class is used to build URLs from Strings. The String can be
normal URLs but also just filenames. The filenames get converted to a
file URL.
- Author:
- Jeremias Maerki
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URLBuilder
public URLBuilder()
buildURL
public static URL buildURL(String spec)
throws MalformedURLException
- Build an URL based on a String. The String can be a normal URL or a
filename. Filenames get automatically converted to to URLs.
- Parameters:
spec - A URL or a filename
- Returns:
- The requested URL
- Throws:
MalformedURLException - If spec cannot be converted to a URL.
buildURL
public static URL buildURL(URL baseURL,
String spec)
throws MalformedURLException
- Build an URL based on a String. The String can be a normal URL or a
filename. Filenames get automatically converted to to URLs.
- Parameters:
baseURL - Base URL for relative pathsspec - A URL or a filename
- Returns:
- The requested URL
- Throws:
MalformedURLException - If spec cannot be converted to a URL.
Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.