public static enum CBORGenerator.Feature extends Enum<CBORGenerator.Feature> implements com.fasterxml.jackson.core.FormatFeature
Enum Constant and Description |
---|
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.
|
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
int ,
8-byte for long and so on). |
WRITE_TYPE_HEADER
Feature that determines whether CBOR "Self-Describe Tag" (value
55799, encoded as 3-byte sequence of
0xD9, 0xD9, 0xF7 )
should be written at the beginning of document or not. |
Modifier and Type | Field and Description |
---|---|
protected boolean |
_defaultState |
protected int |
_mask |
Modifier and Type | Method and Description |
---|---|
static int |
collectDefaults()
Method that calculates bit set (flags) of all features that are
enabled by default.
|
boolean |
enabledByDefault() |
boolean |
enabledIn(int flags) |
int |
getMask() |
static CBORGenerator.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CBORGenerator.Feature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CBORGenerator.Feature WRITE_MINIMAL_INTS
int
,
8-byte for long
and so on).public static final CBORGenerator.Feature WRITE_TYPE_HEADER
0xD9, 0xD9, 0xF7
)
should be written at the beginning of document or not.
Default value is false
meaning that type tag will not be
written at the beginning of a new document.
public static final CBORGenerator.Feature LENIENT_UTF_ENCODING
Default value is false
(for backwards compatibility) meaning that
an invalid surrogate will result in exception (IllegalArgumentException
public static CBORGenerator.Feature[] values()
for (CBORGenerator.Feature c : CBORGenerator.Feature.values()) System.out.println(c);
public static CBORGenerator.Feature 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 int collectDefaults()
public boolean enabledByDefault()
enabledByDefault
in interface com.fasterxml.jackson.core.FormatFeature
enabledByDefault
in interface com.fasterxml.jackson.core.util.JacksonFeature
public boolean enabledIn(int flags)
enabledIn
in interface com.fasterxml.jackson.core.FormatFeature
enabledIn
in interface com.fasterxml.jackson.core.util.JacksonFeature
public int getMask()
getMask
in interface com.fasterxml.jackson.core.FormatFeature
getMask
in interface com.fasterxml.jackson.core.util.JacksonFeature
Copyright © 2021 FasterXML. All rights reserved.