com.fasterxml.jackson.dataformat.protobuf

## Class ProtobufFactory

- java.lang.Object
- - com.fasterxml.jackson.core.JsonFactory
  - - com.fasterxml.jackson.dataformat.protobuf.ProtobufFactory

- All Implemented Interfaces:
    com.fasterxml.jackson.core.Versioned, Serializable

      public class ProtobufFactory
      extends com.fasterxml.jackson.core.JsonFactory

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonFactory

      `com.fasterxml.jackson.core.JsonFactory.Feature`

  - ### Field Summary

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

      `_byteSymbolCanonicalizer, _characterEscapes, _factoryFeatures, _generatorFeatures, _inputDecorator, _objectCodec, _outputDecorator, _parserFeatures, _recyclerRef, _rootCharSymbols, _rootValueSeparator, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS, FORMAT_NAME_JSON`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `ProtobufFactory()`
    `` | `ProtobufFactory(com.fasterxml.jackson.core.ObjectCodec codec)`
    `protected` | `ProtobufFactory(ProtobufFactory src, com.fasterxml.jackson.core.ObjectCodec oc)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected com.fasterxml.jackson.core.io.IOContext` | `_createContext(Object srcRef, boolean resourceManaged)`
    `protected ProtobufGenerator` | `_createGenerator(Writer out, com.fasterxml.jackson.core.io.IOContext ctxt)`
    `protected ProtobufParser` | `_createParser(byte[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt)`
    `protected com.fasterxml.jackson.core.JsonParser` | `_createParser(char[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt, boolean recyclable)`
    `protected ProtobufParser` | `_createParser(InputStream in, com.fasterxml.jackson.core.io.IOContext ctxt)`
    `protected com.fasterxml.jackson.core.JsonParser` | `_createParser(Reader r, com.fasterxml.jackson.core.io.IOContext ctxt)`
    `protected ProtobufGenerator` | `_createUTF8Generator(OutputStream out, com.fasterxml.jackson.core.io.IOContext ctxt)`
    `protected Writer` | `_createWriter(OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc, com.fasterxml.jackson.core.io.IOContext ctxt)`
    `protected <T> T` | `_nonByteSource()`
    `protected <T> T` | `_nonByteTarget()`
    `boolean` | `canHandleBinaryNatively()`
    `boolean` | `canUseCharArrays()`
    `ProtobufFactory` | `copy()`
    `ProtobufGenerator` | `createGenerator(OutputStream out)` Method for constructing `JsonGenerator` for generating protobuf-encoded output.
    `ProtobufGenerator` | `createGenerator(OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc)`
    `ProtobufParser` | `createParser(byte[] data)`
    `ProtobufParser` | `createParser(byte[] data, int offset, int len)`
    `ProtobufParser` | `createParser(File f)`
    `ProtobufParser` | `createParser(InputStream in)`
    `ProtobufParser` | `createParser(URL url)`
    `String` | `getFormatName()`
    `com.fasterxml.jackson.core.format.MatchStrength` | `hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)` Sub-classes need to override this method
    `protected Object` | `readResolve()` Method that we need to override to actually make restoration go through constructors etc.
    `boolean` | `requiresPropertyOrdering()`
    `com.fasterxml.jackson.core.Version` | `version()`

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

      `_checkInvalidCopy, _createDataOutputWrapper, _createParser, _decorate, _decorate, _decorate, _decorate, _decorate, _getBufferRecycler, _optimizedStreamFromURL, canUseSchema, configure, configure, configure, createGenerator, createGenerator, createGenerator, createGenerator, createJsonGenerator, createJsonGenerator, createJsonGenerator, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createParser, createParser, createParser, createParser, createParser, disable, disable, disable, enable, enable, enable, getCharacterEscapes, getCodec, getFormatReadFeatureType, getFormatWriteFeatureType, getInputDecorator, getOutputDecorator, getRootValueSeparator, hasJSONFormat, isEnabled, isEnabled, isEnabled, requiresCustomCodec, setCharacterEscapes, setCodec, setInputDecorator, setOutputDecorator, setRootValueSeparator`

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

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

- - ### Constructor Detail

    - #### ProtobufFactory

          public ProtobufFactory()

    - #### ProtobufFactory

          public ProtobufFactory(com.fasterxml.jackson.core.ObjectCodec codec)

    - #### ProtobufFactory

          protected ProtobufFactory(ProtobufFactory src,
                         com.fasterxml.jackson.core.ObjectCodec oc)

  - ### Method Detail

    - #### copy

          public ProtobufFactory copy()

      Overrides:
        `copy` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### readResolve

          protected Object readResolve()

      Method that we need to override to actually make restoration go through constructors etc. Also: must be overridden by sub-classes as well.
      Overrides:
        `readResolve` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### version

          public com.fasterxml.jackson.core.Version version()

      Specified by:
        `version` in interface `com.fasterxml.jackson.core.Versioned`
      Overrides:
        `version` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### getFormatName

          public String getFormatName()

      Overrides:
        `getFormatName` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### hasFormat

          public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
                                                                    throws IOException

      Sub-classes need to override this method
      Overrides:
        `hasFormat` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### requiresPropertyOrdering

          public boolean requiresPropertyOrdering()

      Overrides:
        `requiresPropertyOrdering` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### canHandleBinaryNatively

          public boolean canHandleBinaryNatively()

      Overrides:
        `canHandleBinaryNatively` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### canUseCharArrays

          public boolean canUseCharArrays()

      Overrides:
        `canUseCharArrays` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### createParser

          public ProtobufParser createParser(File f)
                                      throws IOException

      Overrides:
        `createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### createParser

          public ProtobufParser createParser(URL url)
                                      throws IOException

      Overrides:
        `createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### createParser

          public ProtobufParser createParser(InputStream in)
                                      throws IOException

      Overrides:
        `createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### createParser

          public ProtobufParser createParser(byte[] data)
                                      throws IOException

      Overrides:
        `createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### createParser

          public ProtobufParser createParser(byte[] data,
                                    int offset,
                                    int len)
                                      throws IOException

      Overrides:
        `createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### createGenerator

          public ProtobufGenerator createGenerator(OutputStream out,
                                          com.fasterxml.jackson.core.JsonEncoding enc)
                                            throws IOException

      Overrides:
        `createGenerator` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### createGenerator

          public ProtobufGenerator createGenerator(OutputStream out)
                                            throws IOException

      Method for constructing `JsonGenerator` for generating protobuf-encoded output.

      Since protobuf format always uses UTF-8 internally, no encoding need to be passed to this method.

      Overrides:
        `createGenerator` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _createContext

          protected com.fasterxml.jackson.core.io.IOContext _createContext(Object srcRef,
                                                               boolean resourceManaged)

      Overrides:
        `_createContext` in class `com.fasterxml.jackson.core.JsonFactory`

    - #### _createParser

          protected ProtobufParser _createParser(InputStream in,
                                     com.fasterxml.jackson.core.io.IOContext ctxt)
                                          throws IOException

      Overrides:
        `_createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _createParser

          protected com.fasterxml.jackson.core.JsonParser _createParser(Reader r,
                                                            com.fasterxml.jackson.core.io.IOContext ctxt)
                                                                 throws IOException

      Overrides:
        `_createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _createParser

          protected com.fasterxml.jackson.core.JsonParser _createParser(char[] data,
                                                            int offset,
                                                            int len,
                                                            com.fasterxml.jackson.core.io.IOContext ctxt,
                                                            boolean recyclable)
                                                                 throws IOException

      Overrides:
        `_createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _createParser

          protected ProtobufParser _createParser(byte[] data,
                                     int offset,
                                     int len,
                                     com.fasterxml.jackson.core.io.IOContext ctxt)
                                          throws IOException

      Overrides:
        `_createParser` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _createGenerator

          protected ProtobufGenerator _createGenerator(Writer out,
                                           com.fasterxml.jackson.core.io.IOContext ctxt)
                                                throws IOException

      Overrides:
        `_createGenerator` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _createUTF8Generator

          protected ProtobufGenerator _createUTF8Generator(OutputStream out,
                                               com.fasterxml.jackson.core.io.IOContext ctxt)
                                                    throws IOException

      Overrides:
        `_createUTF8Generator` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _createWriter

          protected Writer _createWriter(OutputStream out,
                             com.fasterxml.jackson.core.JsonEncoding enc,
                             com.fasterxml.jackson.core.io.IOContext ctxt)
                                  throws IOException

      Overrides:
        `_createWriter` in class `com.fasterxml.jackson.core.JsonFactory`
      Throws:
        `IOException`

    - #### _nonByteSource

          protected <T> T _nonByteSource()

    - #### _nonByteTarget

          protected <T> T _nonByteTarget()

Copyright © 2016 FasterXML. All rights reserved.