Note
in Jackson 2.x this was named CBORGenerator.Feature.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final int | |
| public static final CBORWriteFeature | ENCODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING
Feature that determines how binary tagged negative BigInteger values are encoded: either using CBOR standard encoding logic (as per spec), or using legacy Jackson encoding logic (encoding up to Jackson 2.19). |
| public static final CBORWriteFeature | LENIENT_UTF_ENCODING
Feature that determines if an invalid surrogate encoding found in the incoming String should fail with an exception or silently be output as the Unicode 'REPLACEMENT CHARACTER' (U+FFFD) or not; if not, an exception will be thrown to indicate invalid content. |
| public static final CBORWriteFeature | |
| public static final CBORWriteFeature | WRITE_MINIMAL_DOUBLES
Feature that determines whether generator should try to write doubles
as floats: if |
| public static final CBORWriteFeature | WRITE_MINIMAL_INTS
Feature that determines whether generator should try to use smallest
(size-wise) integer representation: if true, will use smallest
representation that is enough to retain value; if false, will use
length indicated by argument type (4-byte for |
| public static final CBORWriteFeature | WRITE_TYPE_HEADER
Feature that determines whether CBOR "Self-Describe Tag" (value
55799, encoded as 3-byte sequence of |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | collectDefaults()
Method that calculates bit set (flags) of all features that are enabled by default. |
| public boolean | enabledByDefault()
Implements tools. Accessor for checking whether this feature is enabled by default. |
| public boolean | enabledIn(int flags)
Implements tools. Convenience method for checking whether feature is enabled in given bitmask. |
| public int | getMask()
Implements tools. Returns bit mask for this feature instance; must be a single bit,
that is of form |
| public static CBORWriteFeature | |
| public static CBORWriteFeature[] |
| _defaultState | back to summary |
|---|---|
| private final boolean _defaultState | |
| _mask | back to summary |
|---|---|
| private final int _mask | |
| ENCODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING | back to summary |
|---|---|
| public static final CBORWriteFeature ENCODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING Feature that determines how binary tagged negative BigInteger values are
encoded: either using CBOR standard encoding logic (as per spec),
or using legacy Jackson encoding logic (encoding up to Jackson 2.19).
When enabled, uses CBOR standard specified encoding of negative values
(e.g., -1 is encoded
Note that there is the counterpart
The default value is | |
| LENIENT_UTF_ENCODING | back to summary |
|---|---|
| public static final CBORWriteFeature LENIENT_UTF_ENCODING Feature that determines if an invalid surrogate encoding found in the incoming String should fail with an exception or silently be output as the Unicode 'REPLACEMENT CHARACTER' (U+FFFD) or not; if not, an exception will be thrown to indicate invalid content.
Default value is | |
| STRINGREF | back to summary |
|---|---|
| public static final CBORWriteFeature STRINGREF Feature that determines if string references are generated based on the stringref) extension. This can save storage space, parsing time, and pool string memory when parsing. Readers of the output must also support the stringref extension to properly decode the data. Extra overhead may be added to generation time and memory usage to compute the shared binary and text strings.
Default value is | |
| WRITE_MINIMAL_DOUBLES | back to summary |
|---|---|
| public static final CBORWriteFeature WRITE_MINIMAL_DOUBLES Feature that determines whether generator should try to write doubles
as floats: if
Default value is | |
| WRITE_MINIMAL_INTS | back to summary |
|---|---|
| public static final CBORWriteFeature WRITE_MINIMAL_INTS Feature that determines whether generator should try to use smallest
(size-wise) integer representation: if true, will use smallest
representation that is enough to retain value; if false, will use
length indicated by argument type (4-byte for | |
| WRITE_TYPE_HEADER | back to summary |
|---|---|
| public static final CBORWriteFeature WRITE_TYPE_HEADER Feature that determines whether CBOR "Self-Describe Tag" (value
55799, encoded as 3-byte sequence of
Default value is | |
| CBORWriteFeature | back to summary |
|---|---|
| private CBORWriteFeature(boolean defaultState) | |
| collectDefaults | back to summary |
|---|---|
| public static int collectDefaults() Method that calculates bit set (flags) of all features that are enabled by default. | |
| enabledByDefault | back to summary |
|---|---|
| public boolean enabledByDefault() Implements tools. Doc from tools. Accessor for checking whether this feature is enabled by default.
| |
| enabledIn | back to summary |
|---|---|
| public boolean enabledIn(int flags) Implements tools. Doc from tools. Convenience method for checking whether feature is enabled in given bitmask.
| |
| getMask | back to summary |
|---|---|
| public int getMask() Implements tools. Doc from tools. Returns bit mask for this feature instance; must be a single bit,
that is of form
| |
| valueOf | back to summary |
|---|---|
| public static CBORWriteFeature valueOf(String name) | |
| values | back to summary |
|---|---|
| public static CBORWriteFeature[] values() | |