public class ByteStringParser extends StringParser
StringParser for parsing Bytes. The parse() method delegates the actual
parsing to Byte.decode(String).StringParser,
Byte| Constructor and Description |
|---|
ByteStringParser()
Deprecated.
Use
getParser() or, even better, JSAP.BYTE_PARSER. |
| Modifier and Type | Method and Description |
|---|---|
static ByteStringParser |
getParser()
Returns a
ByteStringParser. |
Object |
parse(String arg)
Parses the specified argument into a Byte.
|
setUp, tearDownpublic ByteStringParser()
getParser() or, even better, JSAP.BYTE_PARSER.public static ByteStringParser getParser()
ByteStringParser.
Convenient access to the only instance returned by
this method is available through
JSAP.BYTE_PARSER.
ByteStringParser.public Object parse(String arg) throws ParseException
Byte.decode(String). If Byte throws a
NumberFormatException, it is encapsulated into a ParseException and
re-thrown.parse in class StringParserarg - the argument to parseParseException - if Byte.decode(arg) throws a
NumberFormatException.Byte,
StringParser.parse(String)Copyright © 2016. All rights reserved.