Class Byte
Represents a byte. A byte can only contain integer values between 0 and 255. Large values will be masked.
Constructors
Methods
toHex()
Convert the value of the current byte to a hexadecimal representation of the byte. For example, 10 will return "a", 11 will return "b", and so on.
Declaration
String toHex() Returns
| Type | Description |
| String | Hexadecimal representation of the byte. |
toHex(Integer)
Convert the value of the current byte to a hexadecimal representation of the byte with padding zeros. For example, 10 will return "a", 11 will return "b", and so on.
Declaration
String toHex(Integer padding) Parameters
| Type | Name | Description |
| Integer | padding | The number of padding zeros. |
Returns
| Type | Description |
| String | Hexadecimal representation of the byte with padding zeros. |
toString()
Converts a byte value to its string representation.
Declaration
String toString() Returns
| Type | Description |
| String |
toInteger()
Converts a byte value to its integer representation (0 - 255).
Declaration
Integer toInteger() Returns
| Type | Description |
| Integer | Integer representation (0 - 255) |
toBool()
Returns the boolean value of the Byte.
Declaration
Bool toBool() Examples
If(value != 0)
return true;
else
return false;
Returns
| Type | Description |
| Bool |