public enum StreamWriteCapability extends Enum<StreamWriteCapability> implements JacksonFeature
JsonGenerator
for given format
(or in case of buffering, original format) has.
Used in some cases to adjust aspects of things like content conversions and
coercions by format-agnostic functionality.
Specific or expected usage documented by individual capability entry Javadocs.Enum Constant and Description |
---|
CAN_WRITE_BINARY_NATIVELY
Capability that indicates that the data format is able to express binary
data natively, without using textual encoding like Base64.
|
CAN_WRITE_FORMATTED_NUMBERS
Capability that indicates that the data format is able to write
"formatted numbers": that is, output of numbers is done as Strings
and caller is allowed to pass in logical number values as Strings.
|
Modifier and Type | Method and Description |
---|---|
boolean |
enabledByDefault()
Accessor for checking whether this feature is enabled by default.
|
boolean |
enabledIn(int flags)
Convenience method for checking whether feature is enabled in given bitmask.
|
int |
getMask()
Returns bit mask for this feature instance; must be a single bit,
that is of form
1 << N . |
static StreamWriteCapability |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StreamWriteCapability[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StreamWriteCapability CAN_WRITE_BINARY_NATIVELY
Capability is currently enabled for all binary formats and none of textual formats.
public static final StreamWriteCapability CAN_WRITE_FORMATTED_NUMBERS
Capability is currently enabled for most textual formats and none of binary formats.
public static StreamWriteCapability[] values()
for (StreamWriteCapability c : StreamWriteCapability.values()) System.out.println(c);
public static StreamWriteCapability 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 boolean enabledByDefault()
JacksonFeature
enabledByDefault
in interface JacksonFeature
public boolean enabledIn(int flags)
JacksonFeature
enabledIn
in interface JacksonFeature
flags
- Bit field that contains a set of enabled features of this typepublic int getMask()
JacksonFeature
1 << N
.getMask
in interface JacksonFeature
Copyright © 2008–2022 FasterXML. All rights reserved.