Package co.nstant.in.cbor.model
Enum AdditionalInformation
- All Implemented Interfaces:
Serializable
,Comparable<AdditionalInformation>
,java.lang.constant.Constable
public enum AdditionalInformation extends Enum<AdditionalInformation>
The initial byte of each data item contains both information about the major
type (the high-order 3 bits) and additional information (the low-order 5
bits). When the value of the additional information is less than 24, it is
directly used as a small unsigned integer. When it is 24 to 27, the
additional bytes for a variable-length integer immediately follow; the values
24 to 27 of the additional information specify that its length is a 1-, 2-,
4- or 8-byte unsigned integer, respectively. Additional information value 31
is used for indefinite length items, described in Section 2.2. Additional
information values 28 to 30 are reserved for future expansion.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description DIRECT
EIGHT_BYTES
FOUR_BYTES
INDEFINITE
ONE_BYTE
RESERVED
TWO_BYTES
-
Method Summary
Modifier and Type Method Description int
getValue()
static AdditionalInformation
ofByte(int b)
static AdditionalInformation
valueOf(String name)
Returns the enum constant of this type with the specified name.static AdditionalInformation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue() -
ofByte
-