com.fasterxml.jackson.dataformat.avro

## Class AvroFactoryBuilder

- java.lang.Object
- - com.fasterxml.jackson.core.TSFBuilder<AvroFactory,AvroFactoryBuilder>
  - - com.fasterxml.jackson.dataformat.avro.AvroFactoryBuilder

-     public class AvroFactoryBuilder
      extends com.fasterxml.jackson.core.TSFBuilder<AvroFactory,AvroFactoryBuilder>

  `TSFBuilder` implementation for constructing `AvroFactory` instances.

  Note: one of standard features, `JsonGenerator.Feature.AUTO_CLOSE_JSON_CONTENT`, is disabled by default, as it does not play well with error handling. It may be forcibly enabled (if there is ever reason to do so), just defaults to `false`.

  Since:
    3.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_formatGeneratorFeatures` Set of `AvroGenerator.Feature`s enabled, as bitmask.
    `protected int` | `_formatParserFeatures` Set of `AvroParser.Feature`s enabled, as bitmask.
    `protected boolean` | `_useApacheLibDecoder` Flag that is set if Apache Avro lib's decoder is to be used for decoding; `false` to use Jackson native Avro decoder.

    - ### Fields inherited from class com.fasterxml.jackson.core.TSFBuilder

      `_factoryFeatures, _inputDecorator, _outputDecorator, _streamReadFeatures, _streamWriteFeatures, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AvroFactoryBuilder()`
    `` | `AvroFactoryBuilder(AvroFactory base)`
    `protected` | `AvroFactoryBuilder(boolean useApacheDecoder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AvroFactory` | `build()`
    `AvroFactoryBuilder` | `configure(AvroGenerator.Feature f, boolean state)`
    `AvroFactoryBuilder` | `configure(AvroParser.Feature f, boolean state)`
    `AvroFactoryBuilder` | `disable(AvroGenerator.Feature f)`
    `AvroFactoryBuilder` | `disable(AvroGenerator.Feature first, AvroGenerator.Feature... other)`
    `AvroFactoryBuilder` | `disable(AvroParser.Feature f)`
    `AvroFactoryBuilder` | `disable(AvroParser.Feature first, AvroParser.Feature... other)`
    `AvroFactoryBuilder` | `enable(AvroGenerator.Feature f)`
    `AvroFactoryBuilder` | `enable(AvroGenerator.Feature first, AvroGenerator.Feature... other)`
    `AvroFactoryBuilder` | `enable(AvroParser.Feature f)`
    `AvroFactoryBuilder` | `enable(AvroParser.Feature first, AvroParser.Feature... other)`
    `int` | `formatGeneratorFeaturesMask()`
    `int` | `formatParserFeaturesMask()`
    `boolean` | `useApacheLibDecoder()`

    - ### Methods inherited from class com.fasterxml.jackson.core.TSFBuilder

      `_legacyDisable, _legacyDisable, _legacyEnable, _legacyEnable, _this, configure, configure, configure, configure, configure, disable, disable, disable, disable, disable, disable, disable, disable, disable, enable, enable, enable, enable, enable, enable, enable, enable, enable, factoryFeaturesMask, inputDecorator, inputDecorator, outputDecorator, outputDecorator, streamReadFeatures, streamWriteFeatures`

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

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

- - ### Field Detail

    - #### _formatParserFeatures

          protected int _formatParserFeatures

      Set of `AvroParser.Feature`s enabled, as bitmask.

    - #### _formatGeneratorFeatures

          protected int _formatGeneratorFeatures

      Set of `AvroGenerator.Feature`s enabled, as bitmask.

    - #### _useApacheLibDecoder

          protected boolean _useApacheLibDecoder

      Flag that is set if Apache Avro lib's decoder is to be used for decoding; `false` to use Jackson native Avro decoder.

  - ### Constructor Detail

    - #### AvroFactoryBuilder

          protected AvroFactoryBuilder()

    - #### AvroFactoryBuilder

          protected AvroFactoryBuilder(boolean useApacheDecoder)

    - #### AvroFactoryBuilder

          public AvroFactoryBuilder(AvroFactory base)

  - ### Method Detail

    - #### build

          public AvroFactory build()

      Specified by:
        `build` in class `com.fasterxml.jackson.core.TSFBuilder<AvroFactory,AvroFactoryBuilder>`

    - #### formatParserFeaturesMask

          public int formatParserFeaturesMask()

    - #### formatGeneratorFeaturesMask

          public int formatGeneratorFeaturesMask()

    - #### useApacheLibDecoder

          public boolean useApacheLibDecoder()

    - #### enable

          public AvroFactoryBuilder enable(AvroParser.Feature f)

    - #### enable

          public AvroFactoryBuilder enable(AvroParser.Feature first,
                                           AvroParser.Feature... other)

    - #### disable

          public AvroFactoryBuilder disable(AvroParser.Feature f)

    - #### disable

          public AvroFactoryBuilder disable(AvroParser.Feature first,
                                            AvroParser.Feature... other)

    - #### configure

          public AvroFactoryBuilder configure(AvroParser.Feature f,
                                              boolean state)

    - #### enable

          public AvroFactoryBuilder enable(AvroGenerator.Feature f)

    - #### enable

          public AvroFactoryBuilder enable(AvroGenerator.Feature first,
                                           AvroGenerator.Feature... other)

    - #### disable

          public AvroFactoryBuilder disable(AvroGenerator.Feature f)

    - #### disable

          public AvroFactoryBuilder disable(AvroGenerator.Feature first,
                                            AvroGenerator.Feature... other)

    - #### configure

          public AvroFactoryBuilder configure(AvroGenerator.Feature f,
                                              boolean state)

Copyright © 2019 FasterXML. All rights reserved.