MCPcopy Index your code
hub / github.com/davidgiven/luje / decode

Method decode

lib/java/lang/Byte.java:129–136  ·  view source on GitHub ↗

Parses the specified string and returns a Byte instance if the string can be decoded into a single byte value. The string may be an optional minus sign "-" followed by a hexadecimal ("0x..." or "#..."), octal ("0..."), or decimal ("...") representation of a byte. @param string a

(String string)

Source from the content-addressed store, hash-verified

127 * if {@code string} can not be parsed as a byte value.
128 */
129 public static Byte decode(String string) throws NumberFormatException {
130 int intValue = Integer.decode(string).intValue();
131 byte result = (byte) intValue;
132 if (result == intValue) {
133 return valueOf(result);
134 }
135 throw new NumberFormatException();
136 }
137
138 @Override
139 public double doubleValue() {

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
valueOfMethod · 0.95
intValueMethod · 0.45

Tested by

no test coverage detected