com.martiansoftware.jsap.stringparsers
Class URLStringParser
java.lang.Object
com.martiansoftware.jsap.StringParser
com.martiansoftware.jsap.stringparsers.URLStringParser
- public class URLStringParser
- extends StringParser
A 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.
- Author:
- Marty Lamb
- See Also:
StringParser
,
URL
URLStringParser
public URLStringParser()
- Creates a new URLStringParser.
parse
public Object parse(String arg)
throws ParseException
- Parses the specified argument into a URL. This method delegates the
actual
parsing to
new URL(arg)
. If new URL(arg)
throws a MalformedURLException, it is encapsulated in a ParseException
and re-thrown.
- Specified by:
parse
in class StringParser
- Parameters:
arg
- the argument to parse
- Returns:
- a URL as specified by arg.
- Throws:
ParseException
- if new URL(arg)
throws a
MalformedURLException.- See Also:
URL
,
StringParser.parse(String)
Copyright © 2002-2004, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap