|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.martiansoftware.jsap.StringParser
com.martiansoftware.jsap.stringparsers.InetAddressStringParser
A StringParser for parsing java.net.InetAddress objects. The parse() method
delegates the actual
parsing to InetAddress.getByName(String). If
InetAddress.getByName()
throws an UnknownHostException, it is encapsulated in a ParseException and
re-thrown.
StringParser,
InetAddress| Constructor Summary | |
InetAddressStringParser()
Deprecated. Use getParser() or, even better, JSAP.INETADDRESS_PARSER. |
|
| Method Summary | |
static InetAddressStringParser |
getParser()
Returns a InetAddressStringParser. |
Object |
parse(String arg)
Parses the specified argument into an InetAddress. |
| Methods inherited from class com.martiansoftware.jsap.StringParser |
setUp, tearDown |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public InetAddressStringParser()
getParser() or, even better, JSAP.INETADDRESS_PARSER.
| Method Detail |
public static InetAddressStringParser getParser()
InetAddressStringParser.
Convenient access to the only instance returned by
this method is available through
JSAP.INETADDRESS_PARSER.
InetAddressStringParser.
public Object parse(String arg)
throws ParseException
InetAddress.getByName(arg). If
InetAddress.getByName(arg)
throws an UnknownHostException, it is encapsulated in a ParseException
and re-thrown.
parse in class StringParserarg - the argument to parse
ParseException - if InetAddress.getByName(arg) throws
an UnknownHostException.InetAddress,
StringParser.parse(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||