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. |
Object |
parse(String arg)
Parses the specified argument into a URL.
|
setUp, tearDownpublic URLStringParser()
getParser() or, even better, JSAP.URL_PARSER.public static URLStringParser getParser()
URLStringParser.
Convenient access to the only instance returned by
this method is available through
JSAP.URL_PARSER.
URLStringParser.public Object parse(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 StringParserarg - the argument to parseParseException - if new URL(arg) throws a
MalformedURLException.URL,
StringParser.parse(String)Copyright © 2016. All rights reserved.