public enum SpecialByte extends Enum<SpecialByte>
OperatingMode
Enum Constant and Description |
---|
ESCAPE_BYTE |
HEADER_BYTE |
XOFF_BYTE |
XON_BYTE |
Modifier and Type | Method and Description |
---|---|
int |
escapeByte()
Escapes the byte by performing a XOR operation with
0x20 value. |
static SpecialByte |
get(int value)
Returns the
SpecialByte entry associated with the given value. |
int |
getValue()
Returns the special byte value.
|
static boolean |
isSpecialByte(int byteToCheck)
Checks whether the given byte is special or not.
|
static SpecialByte |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SpecialByte[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SpecialByte ESCAPE_BYTE
public static final SpecialByte HEADER_BYTE
public static final SpecialByte XOFF_BYTE
public static final SpecialByte XON_BYTE
public int escapeByte()
0x20
value.public static SpecialByte get(int value)
SpecialByte
entry associated with the given value.value
- Value of the SpecialByte
to retrieve.SpecialByte
associated to the given value, null
if it does not exist in the list.public int getValue()
public static boolean isSpecialByte(int byteToCheck)
byteToCheck
- Byte to check.true
if given byte is special, false
otherwise.public static SpecialByte valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static SpecialByte[] values()
for (SpecialByte c : SpecialByte.values()) System.out.println(c);
© Copyright 2014–2014 Digi International Inc. All rights reserved.