org.apache.batik.util

Class ParsedURLDefaultProtocolHandler

public class ParsedURLDefaultProtocolHandler extends AbstractParsedURLProtocolHandler

The default protocol handler this handles the most common protocols, such as 'file' 'http' 'ftp'. The parsing should be general enought to support most 'normal' URL formats, so in many cases
Constructor Summary
ParsedURLDefaultProtocolHandler()
Default constructor sets no protocol so this becomes default handler.
protected ParsedURLDefaultProtocolHandler(String protocol)
Subclass constructor allows subclasses to provide protocol, to be handled.
Method Summary
static intcharToHex(int ch)
protected ParsedURLDataconstructParsedURLData()
Subclasses can override these method to construct alternate subclasses of ParsedURLData.
protected ParsedURLDataconstructParsedURLData(URL url)
Subclasses can override these method to construct alternate subclasses of ParsedURLData.
ParsedURLDataparseURL(String urlStr)
Parses the string and returns the results of parsing in the ParsedURLData object.
ParsedURLDataparseURL(ParsedURL baseURL, String urlStr)
Parses the string as a sub URL of baseURL, and returns the results of parsing in the ParsedURLData object.
static StringunescapeStr(String str)

Constructor Detail

ParsedURLDefaultProtocolHandler

public ParsedURLDefaultProtocolHandler()
Default constructor sets no protocol so this becomes default handler.

ParsedURLDefaultProtocolHandler

protected ParsedURLDefaultProtocolHandler(String protocol)
Subclass constructor allows subclasses to provide protocol, to be handled.

Method Detail

charToHex

public static int charToHex(int ch)

constructParsedURLData

protected ParsedURLData constructParsedURLData()
Subclasses can override these method to construct alternate subclasses of ParsedURLData.

constructParsedURLData

protected ParsedURLData constructParsedURLData(URL url)
Subclasses can override these method to construct alternate subclasses of ParsedURLData.

Parameters: url the java.net.URL class we reference.

parseURL

public ParsedURLData parseURL(String urlStr)
Parses the string and returns the results of parsing in the ParsedURLData object.

Parameters: urlStr the string to parse as a URL.

parseURL

public ParsedURLData parseURL(ParsedURL baseURL, String urlStr)
Parses the string as a sub URL of baseURL, and returns the results of parsing in the ParsedURLData object.

Parameters: baseURL the base url for parsing. urlStr the string to parse as a URL.

unescapeStr

public static String unescapeStr(String str)
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.