com.fasterxml.jackson.databind.util

## Class TokenBuffer

- java.lang.Object
- - com.fasterxml.jackson.core.JsonGenerator
  - - com.fasterxml.jackson.databind.util.TokenBuffer

- All Implemented Interfaces:
    com.fasterxml.jackson.core.Versioned, java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

      public class TokenBuffer
      extends com.fasterxml.jackson.core.JsonGenerator

  Utility class used for efficient storage of `JsonToken` sequences, needed for temporary buffering. Space efficient for different sequence lengths (especially so for smaller ones; but not significantly less efficient for larger), highly efficient for linear iteration and appending. Implemented as segmented/chunked linked list of tokens; only modifications are via appends.

  Note that before version 2.0, this class was located in the "core" bundle, not data-binding; but since it was only used by data binding, was moved here to reduce size of core package

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `TokenBuffer.Parser`
    `protected static class` | `TokenBuffer.Segment` Individual segment of TokenBuffer that can store up to 16 tokens (limited by 4 bits per token type marker requirement).

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

      `com.fasterxml.jackson.core.JsonGenerator.Feature`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_appendAt` Offset within last segment,
    `protected boolean` | `_closed`
    `protected TokenBuffer.Segment` | `_first` First segment, for contents this buffer has
    `protected boolean` | `_forceBigDecimal` Flag set during construction, if use of `BigDecimal` is to be forced on all floating-point values.
    `protected int` | `_generatorFeatures` Bit flag composed of bits that indicate which `JsonGenerator.Feature`s are enabled.
    `protected boolean` | `_hasNativeId` Do we currently have a native type or object id buffered?
    `protected boolean` | `_hasNativeObjectIds`
    `protected boolean` | `_hasNativeTypeIds`
    `protected TokenBuffer.Segment` | `_last` Last segment of this buffer, one that is used for appending more tokens
    `protected boolean` | `_mayHaveNativeIds`
    `protected com.fasterxml.jackson.core.ObjectCodec` | `_objectCodec` Object codec to use for stream-based object conversion through parser/generator interfaces.
    `protected java.lang.Object` | `_objectId` If native object ids supported, this is the id for following value (or first token of one) to be written.
    `protected java.lang.Object` | `_typeId` If native type ids supported, this is the id for following value (or first token of one) to be written.
    `protected com.fasterxml.jackson.core.json.JsonWriteContext` | `_writeContext`
    `protected static int` | `DEFAULT_GENERATOR_FEATURES`

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

      `_cfgPrettyPrinter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenBuffer(com.fasterxml.jackson.core.JsonParser p)`
    `TokenBuffer(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt)`
    `TokenBuffer(com.fasterxml.jackson.core.ObjectCodec codec)` Deprecated. since 2.3 preferred variant is one that takes `JsonParser` or additional boolean parameter.
    `TokenBuffer(com.fasterxml.jackson.core.ObjectCodec codec, boolean hasNativeIds)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_append(com.fasterxml.jackson.core.JsonToken type)`
    `protected void` | `_append(com.fasterxml.jackson.core.JsonToken type, java.lang.Object value)`
    `protected void` | `_appendRaw(int rawType, java.lang.Object value)`
    `protected void` | `_appendValue(com.fasterxml.jackson.core.JsonToken type)` Similar to `_append(JsonToken)` but also updates context with knowledge that a scalar value was written
    `protected void` | `_appendValue(com.fasterxml.jackson.core.JsonToken type, java.lang.Object value)` Similar to `_append(JsonToken,Object)` but also updates context with knowledge that a scalar value was written
    `protected void` | `_reportUnsupportedOperation()`
    `TokenBuffer` | `append(TokenBuffer other)` Helper method that will append contents of given buffer into this buffer.
    `com.fasterxml.jackson.core.JsonParser` | `asParser()` Method used to create a `JsonParser` that can read contents stored in this buffer.
    `com.fasterxml.jackson.core.JsonParser` | `asParser(com.fasterxml.jackson.core.JsonParser src)`
    `com.fasterxml.jackson.core.JsonParser` | `asParser(com.fasterxml.jackson.core.ObjectCodec codec)` Method used to create a `JsonParser` that can read contents stored in this buffer.
    `boolean` | `canWriteBinaryNatively()` Since we can efficiently store `byte[]`, yes.
    `boolean` | `canWriteObjectId()`
    `boolean` | `canWriteTypeId()`
    `void` | `close()`
    `void` | `copyCurrentEvent(com.fasterxml.jackson.core.JsonParser p)`
    `void` | `copyCurrentStructure(com.fasterxml.jackson.core.JsonParser p)`
    `TokenBuffer` | `deserialize(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt)` Helper method used by standard deserializer.
    `com.fasterxml.jackson.core.JsonGenerator` | `disable(com.fasterxml.jackson.core.JsonGenerator.Feature f)`
    `com.fasterxml.jackson.core.JsonGenerator` | `enable(com.fasterxml.jackson.core.JsonGenerator.Feature f)`
    `com.fasterxml.jackson.core.JsonToken` | `firstToken()`
    `void` | `flush()`
    `TokenBuffer` | `forceUseOfBigDecimal(boolean b)`
    `com.fasterxml.jackson.core.ObjectCodec` | `getCodec()`
    `int` | `getFeatureMask()`
    `com.fasterxml.jackson.core.json.JsonWriteContext` | `getOutputContext()`
    `boolean` | `isClosed()`
    `boolean` | `isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f)`
    `com.fasterxml.jackson.core.JsonGenerator` | `overrideStdFeatures(int values, int mask)`
    `void` | `serialize(com.fasterxml.jackson.core.JsonGenerator gen)` Helper method that will write all contents of this buffer using given `JsonGenerator`.
    `com.fasterxml.jackson.core.JsonGenerator` | `setCodec(com.fasterxml.jackson.core.ObjectCodec oc)`
    `com.fasterxml.jackson.core.JsonGenerator` | `setFeatureMask(int mask)` Deprecated.
    `java.lang.String` | `toString()`
    `com.fasterxml.jackson.core.JsonGenerator` | `useDefaultPrettyPrinter()`
    `com.fasterxml.jackson.core.Version` | `version()`
    `void` | `writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len)`
    `int` | `writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant, java.io.InputStream data, int dataLength)` Although we could support this method, it does not necessarily make sense: we can not make good use of streaming because buffer must hold all the data.
    `void` | `writeBoolean(boolean state)`
    `void` | `writeEmbeddedObject(java.lang.Object object)`
    `void` | `writeEndArray()`
    `void` | `writeEndObject()`
    `void` | `writeFieldName(com.fasterxml.jackson.core.SerializableString name)`
    `void` | `writeFieldName(java.lang.String name)`
    `void` | `writeNull()`
    `void` | `writeNumber(java.math.BigDecimal dec)`
    `void` | `writeNumber(java.math.BigInteger v)`
    `void` | `writeNumber(double d)`
    `void` | `writeNumber(float f)`
    `void` | `writeNumber(int i)`
    `void` | `writeNumber(long l)`
    `void` | `writeNumber(short i)`
    `void` | `writeNumber(java.lang.String encodedValue)`
    `void` | `writeObject(java.lang.Object value)`
    `void` | `writeObjectId(java.lang.Object id)`
    `void` | `writeRaw(char c)`
    `void` | `writeRaw(char[] text, int offset, int len)`
    `void` | `writeRaw(com.fasterxml.jackson.core.SerializableString text)`
    `void` | `writeRaw(java.lang.String text)`
    `void` | `writeRaw(java.lang.String text, int offset, int len)`
    `void` | `writeRawUTF8String(byte[] text, int offset, int length)`
    `void` | `writeRawValue(char[] text, int offset, int len)`
    `void` | `writeRawValue(java.lang.String text)`
    `void` | `writeRawValue(java.lang.String text, int offset, int len)`
    `void` | `writeStartArray()`
    `void` | `writeStartObject()`
    `void` | `writeStartObject(java.lang.Object forValue)`
    `void` | `writeString(char[] text, int offset, int len)`
    `void` | `writeString(com.fasterxml.jackson.core.SerializableString text)`
    `void` | `writeString(java.lang.String text)`
    `void` | `writeTree(com.fasterxml.jackson.core.TreeNode node)`
    `void` | `writeTypeId(java.lang.Object id)`
    `void` | `writeUTF8String(byte[] text, int offset, int length)`

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

      `_reportError, _throwInternal, _verifyOffsets, _writeSimpleObject, canOmitFields, canUseSchema, canWriteFormattedNumbers, configure, getCharacterEscapes, getCurrentValue, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getOutputTarget, getPrettyPrinter, getSchema, overrideFormatFeatures, setCharacterEscapes, setCurrentValue, setHighestNonEscapedChar, setPrettyPrinter, setRootValueSeparator, setSchema, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeFieldId, writeNullField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectRef, writeOmittedField, writeRawValue, writeStartArray, writeStringField`

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

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

- - ### Field Detail

    - #### DEFAULT_GENERATOR_FEATURES

          protected static final int DEFAULT_GENERATOR_FEATURES

    - #### _objectCodec

          protected com.fasterxml.jackson.core.ObjectCodec _objectCodec

      Object codec to use for stream-based object conversion through parser/generator interfaces. If null, such methods can not be used.

    - #### _generatorFeatures

          protected int _generatorFeatures

      Bit flag composed of bits that indicate which `JsonGenerator.Feature`s are enabled.

      NOTE: most features have no effect on this class

    - #### _closed

          protected boolean _closed

    - #### _hasNativeTypeIds

          protected boolean _hasNativeTypeIds

      Since:
        2.3

    - #### _hasNativeObjectIds

          protected boolean _hasNativeObjectIds

      Since:
        2.3

    - #### _mayHaveNativeIds

          protected boolean _mayHaveNativeIds

      Since:
        2.3

    - #### _forceBigDecimal

          protected boolean _forceBigDecimal

      Flag set during construction, if use of `BigDecimal` is to be forced on all floating-point values.
      Since:
        2.7

    - #### _first

          protected TokenBuffer.Segment _first

      First segment, for contents this buffer has

    - #### _last

          protected TokenBuffer.Segment _last

      Last segment of this buffer, one that is used for appending more tokens

    - #### _appendAt

          protected int _appendAt

      Offset within last segment,

    - #### _typeId

          protected java.lang.Object _typeId

      If native type ids supported, this is the id for following value (or first token of one) to be written.

    - #### _objectId

          protected java.lang.Object _objectId

      If native object ids supported, this is the id for following value (or first token of one) to be written.

    - #### _hasNativeId

          protected boolean _hasNativeId

      Do we currently have a native type or object id buffered?

    - #### _writeContext

          protected com.fasterxml.jackson.core.json.JsonWriteContext _writeContext

  - ### Constructor Detail

    - #### TokenBuffer

          @Deprecated
          public TokenBuffer(com.fasterxml.jackson.core.ObjectCodec codec)

      Deprecated. since 2.3 preferred variant is one that takes `JsonParser` or additional boolean parameter.
      Parameters:
        `codec` - Object codec to use for stream-based object conversion through parser/generator interfaces. If null, such methods can not be used.

    - #### TokenBuffer

          public TokenBuffer(com.fasterxml.jackson.core.ObjectCodec codec,
                     boolean hasNativeIds)

      Parameters:
        `codec` - Object codec to use for stream-based object conversion through parser/generator interfaces. If null, such methods can not be used.
        `hasNativeIds` - Whether resulting `JsonParser` (if created) is considered to support native type and object ids

    - #### TokenBuffer

          public TokenBuffer(com.fasterxml.jackson.core.JsonParser p)

      Since:
        2.3

    - #### TokenBuffer

          public TokenBuffer(com.fasterxml.jackson.core.JsonParser p,
                     DeserializationContext ctxt)

      Since:
        2.7

  - ### Method Detail

    - #### forceUseOfBigDecimal

          public TokenBuffer forceUseOfBigDecimal(boolean b)

      Since:
        2.7

    - #### version

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

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

    - #### asParser

          public com.fasterxml.jackson.core.JsonParser asParser()

      Method used to create a `JsonParser` that can read contents stored in this buffer. Will use default `_objectCodec` for object conversions.

      Note: instances are not synchronized, that is, they are not thread-safe if there are concurrent appends to the underlying buffer.

      Returns:
        Parser that can be used for reading contents stored in this buffer

    - #### asParser

          public com.fasterxml.jackson.core.JsonParser asParser(com.fasterxml.jackson.core.ObjectCodec codec)

      Method used to create a `JsonParser` that can read contents stored in this buffer.

      Note: instances are not synchronized, that is, they are not thread-safe if there are concurrent appends to the underlying buffer.

      Parameters:
        `codec` - Object codec to use for stream-based object conversion through parser/generator interfaces. If null, such methods can not be used.
      Returns:
        Parser that can be used for reading contents stored in this buffer

    - #### asParser

          public com.fasterxml.jackson.core.JsonParser asParser(com.fasterxml.jackson.core.JsonParser src)

      Parameters:
        `src` - Parser to use for accessing source information like location, configured codec

    - #### firstToken

          public com.fasterxml.jackson.core.JsonToken firstToken()

    - #### append

          public TokenBuffer append(TokenBuffer other)
                             throws java.io.IOException

      Helper method that will append contents of given buffer into this buffer. Not particularly optimized; can be made faster if there is need.
      Returns:
        This buffer
      Throws:
        `java.io.IOException`

    - #### serialize

          public void serialize(com.fasterxml.jackson.core.JsonGenerator gen)
                         throws java.io.IOException

      Helper method that will write all contents of this buffer using given `JsonGenerator`.

      Note: this method would be enough to implement `JsonSerializer` for `TokenBuffer` type; but we can not have upwards references (from core to mapper package); and as such we also can not take second argument.

      Throws:
        `java.io.IOException`

    - #### deserialize

          public TokenBuffer deserialize(com.fasterxml.jackson.core.JsonParser p,
                                DeserializationContext ctxt)
                                  throws java.io.IOException

      Helper method used by standard deserializer.
      Throws:
        `java.io.IOException`
      Since:
        2.3

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### enable

          public com.fasterxml.jackson.core.JsonGenerator enable(com.fasterxml.jackson.core.JsonGenerator.Feature f)

      Specified by:
        `enable` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### disable

          public com.fasterxml.jackson.core.JsonGenerator disable(com.fasterxml.jackson.core.JsonGenerator.Feature f)

      Specified by:
        `disable` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### isEnabled

          public boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f)

      Specified by:
        `isEnabled` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### getFeatureMask

          public int getFeatureMask()

      Specified by:
        `getFeatureMask` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### setFeatureMask

          @Deprecated
          public com.fasterxml.jackson.core.JsonGenerator setFeatureMask(int mask)

      Deprecated.
      Specified by:
        `setFeatureMask` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### overrideStdFeatures

          public com.fasterxml.jackson.core.JsonGenerator overrideStdFeatures(int values,
                                                                     int mask)

      Overrides:
        `overrideStdFeatures` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### useDefaultPrettyPrinter

          public com.fasterxml.jackson.core.JsonGenerator useDefaultPrettyPrinter()

      Specified by:
        `useDefaultPrettyPrinter` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### setCodec

          public com.fasterxml.jackson.core.JsonGenerator setCodec(com.fasterxml.jackson.core.ObjectCodec oc)

      Specified by:
        `setCodec` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### getCodec

          public com.fasterxml.jackson.core.ObjectCodec getCodec()

      Specified by:
        `getCodec` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### getOutputContext

          public final com.fasterxml.jackson.core.json.JsonWriteContext getOutputContext()

      Specified by:
        `getOutputContext` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### canWriteBinaryNatively

          public boolean canWriteBinaryNatively()

      Since we can efficiently store `byte[]`, yes.
      Overrides:
        `canWriteBinaryNatively` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### flush

          public void flush()
                     throws java.io.IOException

      Specified by:
        `flush` in interface `java.io.Flushable`
      Specified by:
        `flush` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### isClosed

          public boolean isClosed()

      Specified by:
        `isClosed` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### writeStartArray

          public final void writeStartArray()
                                     throws java.io.IOException

      Specified by:
        `writeStartArray` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeEndArray

          public final void writeEndArray()
                                   throws java.io.IOException

      Specified by:
        `writeEndArray` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeStartObject

          public final void writeStartObject()
                                      throws java.io.IOException

      Specified by:
        `writeStartObject` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeStartObject

          public void writeStartObject(java.lang.Object forValue)
                                throws java.io.IOException

      Overrides:
        `writeStartObject` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeEndObject

          public final void writeEndObject()
                                    throws java.io.IOException

      Specified by:
        `writeEndObject` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeFieldName

          public final void writeFieldName(java.lang.String name)
                                    throws java.io.IOException

      Specified by:
        `writeFieldName` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeFieldName

          public void writeFieldName(com.fasterxml.jackson.core.SerializableString name)
                              throws java.io.IOException

      Specified by:
        `writeFieldName` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeString

          public void writeString(java.lang.String text)
                           throws java.io.IOException

      Specified by:
        `writeString` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeString

          public void writeString(char[] text,
                         int offset,
                         int len)
                           throws java.io.IOException

      Specified by:
        `writeString` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeString

          public void writeString(com.fasterxml.jackson.core.SerializableString text)
                           throws java.io.IOException

      Specified by:
        `writeString` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRawUTF8String

          public void writeRawUTF8String(byte[] text,
                                int offset,
                                int length)
                                  throws java.io.IOException

      Specified by:
        `writeRawUTF8String` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeUTF8String

          public void writeUTF8String(byte[] text,
                             int offset,
                             int length)
                               throws java.io.IOException

      Specified by:
        `writeUTF8String` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRaw

          public void writeRaw(java.lang.String text)
                        throws java.io.IOException

      Specified by:
        `writeRaw` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRaw

          public void writeRaw(java.lang.String text,
                      int offset,
                      int len)
                        throws java.io.IOException

      Specified by:
        `writeRaw` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRaw

          public void writeRaw(com.fasterxml.jackson.core.SerializableString text)
                        throws java.io.IOException

      Overrides:
        `writeRaw` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRaw

          public void writeRaw(char[] text,
                      int offset,
                      int len)
                        throws java.io.IOException

      Specified by:
        `writeRaw` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRaw

          public void writeRaw(char c)
                        throws java.io.IOException

      Specified by:
        `writeRaw` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRawValue

          public void writeRawValue(java.lang.String text)
                             throws java.io.IOException

      Specified by:
        `writeRawValue` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRawValue

          public void writeRawValue(java.lang.String text,
                           int offset,
                           int len)
                             throws java.io.IOException

      Specified by:
        `writeRawValue` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeRawValue

          public void writeRawValue(char[] text,
                           int offset,
                           int len)
                             throws java.io.IOException

      Specified by:
        `writeRawValue` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(short i)
                           throws java.io.IOException

      Overrides:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(int i)
                           throws java.io.IOException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(long l)
                           throws java.io.IOException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(double d)
                           throws java.io.IOException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(float f)
                           throws java.io.IOException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(java.math.BigDecimal dec)
                           throws java.io.IOException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(java.math.BigInteger v)
                           throws java.io.IOException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNumber

          public void writeNumber(java.lang.String encodedValue)
                           throws java.io.IOException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeBoolean

          public void writeBoolean(boolean state)
                            throws java.io.IOException

      Specified by:
        `writeBoolean` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeNull

          public void writeNull()
                         throws java.io.IOException

      Specified by:
        `writeNull` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeObject

          public void writeObject(java.lang.Object value)
                           throws java.io.IOException

      Specified by:
        `writeObject` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeTree

          public void writeTree(com.fasterxml.jackson.core.TreeNode node)
                         throws java.io.IOException

      Specified by:
        `writeTree` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeBinary

          public void writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant,
                         byte[] data,
                         int offset,
                         int len)
                           throws java.io.IOException

      Specified by:
        `writeBinary` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### writeBinary

          public int writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant,
                        java.io.InputStream data,
                        int dataLength)

      Although we could support this method, it does not necessarily make sense: we can not make good use of streaming because buffer must hold all the data. Because of this, currently this will simply throw `UnsupportedOperationException`
      Specified by:
        `writeBinary` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### canWriteTypeId

          public boolean canWriteTypeId()

      Overrides:
        `canWriteTypeId` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### canWriteObjectId

          public boolean canWriteObjectId()

      Overrides:
        `canWriteObjectId` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### writeTypeId

          public void writeTypeId(java.lang.Object id)

      Overrides:
        `writeTypeId` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### writeObjectId

          public void writeObjectId(java.lang.Object id)

      Overrides:
        `writeObjectId` in class `com.fasterxml.jackson.core.JsonGenerator`

    - #### writeEmbeddedObject

          public void writeEmbeddedObject(java.lang.Object object)
                                   throws java.io.IOException

      Overrides:
        `writeEmbeddedObject` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### copyCurrentEvent

          public void copyCurrentEvent(com.fasterxml.jackson.core.JsonParser p)
                                throws java.io.IOException

      Overrides:
        `copyCurrentEvent` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### copyCurrentStructure

          public void copyCurrentStructure(com.fasterxml.jackson.core.JsonParser p)
                                    throws java.io.IOException

      Overrides:
        `copyCurrentStructure` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `java.io.IOException`

    - #### _append

          protected final void _append(com.fasterxml.jackson.core.JsonToken type)

    - #### _append

          protected final void _append(com.fasterxml.jackson.core.JsonToken type,
                     java.lang.Object value)

    - #### _appendValue

          protected final void _appendValue(com.fasterxml.jackson.core.JsonToken type)

      Similar to `_append(JsonToken)` but also updates context with knowledge that a scalar value was written
      Since:
        2.6.4

    - #### _appendValue

          protected final void _appendValue(com.fasterxml.jackson.core.JsonToken type,
                          java.lang.Object value)

      Similar to `_append(JsonToken,Object)` but also updates context with knowledge that a scalar value was written
      Since:
        2.6.4

    - #### _appendRaw

          protected final void _appendRaw(int rawType,
                        java.lang.Object value)

    - #### _reportUnsupportedOperation

          protected void _reportUnsupportedOperation()

      Overrides:
        `_reportUnsupportedOperation` in class `com.fasterxml.jackson.core.JsonGenerator`