public class URLStringParser extends StringParser
StringParser
for parsing java.net.URL objects. The parse() method
delegates the actual
parsing to new URL(String)
. If new URL()
throws a MalformedURLException, it is encapsulated in a ParseException and
re-thrown.StringParser
,
URL
Constructor and Description |
---|
URLStringParser()
Deprecated.
Use
getParser() or, even better, JSAP.URL_PARSER . |
Modifier and Type | Method and Description |
---|---|
static URLStringParser |
getParser()
Returns a
URLStringParser . |
java.lang.Object |
parse(java.lang.String arg)
Parses the specified argument into a URL.
|
setUp, tearDown
public static URLStringParser getParser()
URLStringParser
.
Convenient access to the only instance returned by
this method is available through
JSAP.URL_PARSER
.
URLStringParser
.public java.lang.Object parse(java.lang.String arg) throws ParseException
new URL(arg)
. If new URL(arg)
throws a MalformedURLException, it is encapsulated in a ParseException
and re-thrown.parse
in class StringParser
arg
- the argument to parseParseException
- if new URL(arg)
throws a
MalformedURLException.URL
,
StringParser.parse(String)
Copyright © 2002-2006, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap