com.fasterxml.jackson.dataformat.cbor

## Class CBORConstants

- java.lang.Object
- - com.fasterxml.jackson.dataformat.cbor.CBORConstants

    public final class CBORConstants
    extends Object

Constants used by `CBORGenerator` and `CBORParser`

Author:
  Tatu Saloranta

### Field Summary

Fields
`static byte` `BYTE_ARRAY_2_ELEMENTS`
`static byte` `BYTE_ARRAY_INDEFINITE`
`static byte` `BYTE_BREAK`
`static byte` `BYTE_EMPTY_STRING`
`static byte` `BYTE_FALSE`
`static byte` `BYTE_FLOAT16`
`static byte` `BYTE_FLOAT32`
`static byte` `BYTE_FLOAT64`
`static byte` `BYTE_NULL`
`static byte` `BYTE_OBJECT_INDEFINITE`
`static byte` `BYTE_STRING_1BYTE_LEN`
`static byte` `BYTE_STRING_2BYTE_LEN`
`static byte` `BYTE_STRING_INDEFINITE` String that is chunked
`static byte` `BYTE_TAG_BIGFLOAT`
`static byte` `BYTE_TAG_BIGNUM_NEG`
`static byte` `BYTE_TAG_BIGNUM_POS`
`static byte` `BYTE_TAG_DECIMAL_FRACTION`
`static byte` `BYTE_TRUE`
`static int` `INT_BREAK`
`static int` `MAJOR_TYPE_ARRAY`
`static int` `MAJOR_TYPE_BYTES`
`static int` `MAJOR_TYPE_INT_NEG`
`static int` `MAJOR_TYPE_INT_POS`
`static int` `MAJOR_TYPE_MISC`
`static int` `MAJOR_TYPE_OBJECT`
`static int` `MAJOR_TYPE_TAG`
`static int` `MAJOR_TYPE_TEXT`
`static int` `MASK_MAJOR_TYPE`
`static int` `PREFIX_TYPE_ARRAY`
`static int` `PREFIX_TYPE_BYTES`
`static int` `PREFIX_TYPE_INT_NEG`
`static int` `PREFIX_TYPE_INT_POS`
`static int` `PREFIX_TYPE_MISC`
`static int` `PREFIX_TYPE_OBJECT`
`static int` `PREFIX_TYPE_TAG`
`static int` `PREFIX_TYPE_TEXT`
`static int` `SUFFIX_INDEFINITE`
`static int[]` `sUtf8UnitLengths` Additionally we can combine UTF-8 decoding info into similar data table.
`static int` `TAG_ID_SELF_DESCRIBE` As per spec, this is a sort of "nop" tag, useful as marker for the very first root-level data item.

### Constructor Summary

Constructors
Constructor and Description
`CBORConstants()`

### Method Summary

Methods
`static boolean` `hasMajorType(int expType, byte encoded)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MAJOR_TYPE_INT_POS

    public static final int MAJOR_TYPE_INT_POS

See Also:
  Constant Field Values

#### MAJOR_TYPE_INT_NEG

    public static final int MAJOR_TYPE_INT_NEG

See Also:
  Constant Field Values

#### MAJOR_TYPE_BYTES

    public static final int MAJOR_TYPE_BYTES

See Also:
  Constant Field Values

#### MAJOR_TYPE_TEXT

    public static final int MAJOR_TYPE_TEXT

See Also:
  Constant Field Values

#### MAJOR_TYPE_ARRAY

    public static final int MAJOR_TYPE_ARRAY

See Also:
  Constant Field Values

#### MAJOR_TYPE_OBJECT

    public static final int MAJOR_TYPE_OBJECT

See Also:
  Constant Field Values

#### MAJOR_TYPE_TAG

    public static final int MAJOR_TYPE_TAG

See Also:
  Constant Field Values

#### MAJOR_TYPE_MISC

    public static final int MAJOR_TYPE_MISC

See Also:
  Constant Field Values

#### PREFIX_TYPE_INT_POS

    public static final int PREFIX_TYPE_INT_POS

See Also:
  Constant Field Values

#### PREFIX_TYPE_INT_NEG

    public static final int PREFIX_TYPE_INT_NEG

See Also:
  Constant Field Values

#### PREFIX_TYPE_BYTES

    public static final int PREFIX_TYPE_BYTES

See Also:
  Constant Field Values

#### PREFIX_TYPE_TEXT

    public static final int PREFIX_TYPE_TEXT

See Also:
  Constant Field Values

#### PREFIX_TYPE_ARRAY

    public static final int PREFIX_TYPE_ARRAY

See Also:
  Constant Field Values

#### PREFIX_TYPE_OBJECT

    public static final int PREFIX_TYPE_OBJECT

See Also:
  Constant Field Values

#### PREFIX_TYPE_TAG

    public static final int PREFIX_TYPE_TAG

See Also:
  Constant Field Values

#### PREFIX_TYPE_MISC

    public static final int PREFIX_TYPE_MISC

See Also:
  Constant Field Values

#### SUFFIX_INDEFINITE

    public static final int SUFFIX_INDEFINITE

See Also:
  Constant Field Values

#### MASK_MAJOR_TYPE

    public static final int MASK_MAJOR_TYPE

See Also:
  Constant Field Values

#### TAG_ID_SELF_DESCRIBE

    public static final int TAG_ID_SELF_DESCRIBE

As per spec, this is a sort of "nop" tag, useful as marker for the very first root-level data item.

See Also:
  Constant Field Values

#### BYTE_ARRAY_INDEFINITE

    public static final byte BYTE_ARRAY_INDEFINITE

See Also:
  Constant Field Values

#### BYTE_OBJECT_INDEFINITE

    public static final byte BYTE_OBJECT_INDEFINITE

See Also:
  Constant Field Values

#### BYTE_ARRAY_2_ELEMENTS

    public static final byte BYTE_ARRAY_2_ELEMENTS

See Also:
  Constant Field Values

#### BYTE_FALSE

    public static final byte BYTE_FALSE

See Also:
  Constant Field Values

#### BYTE_TRUE

    public static final byte BYTE_TRUE

See Also:
  Constant Field Values

#### BYTE_NULL

    public static final byte BYTE_NULL

See Also:
  Constant Field Values

#### BYTE_EMPTY_STRING

    public static final byte BYTE_EMPTY_STRING

See Also:
  Constant Field Values

#### BYTE_STRING_INDEFINITE

    public static final byte BYTE_STRING_INDEFINITE

String that is chunked

See Also:
  Constant Field Values

#### BYTE_STRING_1BYTE_LEN

    public static final byte BYTE_STRING_1BYTE_LEN

See Also:
  Constant Field Values

#### BYTE_STRING_2BYTE_LEN

    public static final byte BYTE_STRING_2BYTE_LEN

See Also:
  Constant Field Values

#### BYTE_FLOAT16

    public static final byte BYTE_FLOAT16

See Also:
  Constant Field Values

#### BYTE_FLOAT32

    public static final byte BYTE_FLOAT32

See Also:
  Constant Field Values

#### BYTE_FLOAT64

    public static final byte BYTE_FLOAT64

See Also:
  Constant Field Values

#### BYTE_TAG_BIGNUM_POS

    public static final byte BYTE_TAG_BIGNUM_POS

See Also:
  Constant Field Values

#### BYTE_TAG_BIGNUM_NEG

    public static final byte BYTE_TAG_BIGNUM_NEG

See Also:
  Constant Field Values

#### BYTE_TAG_DECIMAL_FRACTION

    public static final byte BYTE_TAG_DECIMAL_FRACTION

See Also:
  Constant Field Values

#### BYTE_TAG_BIGFLOAT

    public static final byte BYTE_TAG_BIGFLOAT

See Also:
  Constant Field Values

#### BYTE_BREAK

    public static final byte BYTE_BREAK

See Also:
  Constant Field Values

#### INT_BREAK

    public static final int INT_BREAK

See Also:
  Constant Field Values

#### sUtf8UnitLengths

    public static final int[] sUtf8UnitLengths

Additionally we can combine UTF-8 decoding info into similar data table. Values indicate "byte length - 1"; meaning -1 is used for invalid bytes, 0 for single-byte codes, 1 for 2-byte codes and 2 for 3-byte codes.

### Constructor Detail

#### CBORConstants

    public CBORConstants()

### Method Detail

#### hasMajorType

    public static boolean hasMajorType(int expType,
                       byte encoded)