Share via


Byte.Decode(String) Method

Definition

Decodes a String into a Byte.

[Android.Runtime.Register("decode", "(Ljava/lang/String;)Ljava/lang/Byte;", "")]
public static Java.Lang.Byte Decode (string nm);
[<Android.Runtime.Register("decode", "(Ljava/lang/String;)Ljava/lang/Byte;", "")>]
static member Decode : string -> Java.Lang.Byte

Parameters

nm
String

the String to decode.

Returns

a Byte object holding the byte value represented by nm

Attributes

Exceptions

if string cannot be parsed as a byte value.

Remarks

Decodes a String into a Byte. Accepts decimal, hexadecimal, and octal numbers given by the following grammar:

<blockquote> <dl> <dt>DecodableString:<dd>Sign<sub>opt</sub> DecimalNumeral<dd>Sign<sub>opt</sub>0xHexDigits<dd>Sign<sub>opt</sub>0XHexDigits<dd>Sign<sub>opt</sub>#HexDigits<dd>Sign<sub>opt</sub>0OctalDigits<dt>Sign:<dd>-<dd>+</dl> </blockquote>

DecimalNumeral, HexDigits, and OctalDigits are as defined in section {

Java documentation for java.lang.Byte.decode(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to