com.fasterxml.jackson.dataformat.ion

## Class IonGenerator

- java.lang.Object
- - com.fasterxml.jackson.core.JsonGenerator
  - - com.fasterxml.jackson.core.base.GeneratorBase
    - - com.fasterxml.jackson.dataformat.ion.IonGenerator

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

      public class IonGenerator
      extends com.fasterxml.jackson.core.base.GeneratorBase

  Implementation of `JsonGenerator` that will use an underlying `IonWriter` for actual writing of content.

- - ### Nested Class Summary

    - ### 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 Closeable` | `_destination` Highest-level output abstraction we can use; either OutputStream or Writer.
    `protected com.fasterxml.jackson.core.io.IOContext` | `_ioContext`
    `protected com.amazon.ion.IonWriter` | `_writer`

    - ### Fields inherited from class com.fasterxml.jackson.core.base.GeneratorBase

      `_cfgNumbersAsStrings, _closed, _features, _objectCodec, _writeContext, DERIVED_FEATURES_MASK, MAX_BIG_DECIMAL_SCALE, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST, WRITE_BINARY, WRITE_BOOLEAN, WRITE_NULL, WRITE_NUMBER, WRITE_RAW, WRITE_STRING`

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

      `_cfgPrettyPrinter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IonGenerator(int features, com.fasterxml.jackson.core.ObjectCodec codec, com.amazon.ion.IonWriter ion, com.fasterxml.jackson.core.io.IOContext ctxt, Closeable dst)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_releaseBuffers()`
    `protected void` | `_reportNoRaw()`
    `protected void` | `_verifyValueWrite(String msg)`
    `protected void` | `_writeFieldName(String value)`
    `void` | `annotateNextValue(String annotation)` Annotates the next structure or value written -- `stepIn()` or one of the `IonWriter`s `write*()` methods.
    `boolean` | `canWriteBinaryNatively()`
    `boolean` | `canWriteTypeId()`
    `void` | `close()`
    `void` | `flush()`
    `boolean` | `isClosed()`
    `String` | `toString()`
    `com.fasterxml.jackson.core.Version` | `version()`
    `void` | `writeBinary(com.fasterxml.jackson.core.Base64Variant b64v, byte[] data, int offset, int length)`
    `void` | `writeBoolean(boolean value)`
    `void` | `writeDate(Calendar value)`
    `void` | `writeEndArray()`
    `void` | `writeEndObject()`
    `void` | `writeFieldName(String value)`
    `void` | `writeNull()`
    `void` | `writeNull(com.amazon.ion.IonType ionType)`
    `void` | `writeNumber(BigDecimal value)`
    `void` | `writeNumber(BigInteger value)`
    `void` | `writeNumber(double value)`
    `void` | `writeNumber(float value)`
    `void` | `writeNumber(int value)`
    `void` | `writeNumber(long value)`
    `void` | `writeNumber(String value)`
    `void` | `writeObject(Object pojo)`
    `void` | `writeRaw(char value)`
    `void` | `writeRaw(char[] value, int arg1, int arg2)`
    `void` | `writeRaw(String value)`
    `void` | `writeRaw(String value, int arg1, int arg2)`
    `void` | `writeRawUTF8String(byte[] text, int offset, int length)`
    `void` | `writeRawValue(char[] value, int arg1, int arg2)`
    `void` | `writeRawValue(String value)`
    `void` | `writeRawValue(String value, int arg1, int arg2)`
    `void` | `writeStartArray()`
    `void` | `writeStartObject()`
    `void` | `writeString(char[] buffer, int offset, int length)`
    `void` | `writeString(String value)`
    `void` | `writeSymbol(String value)`
    `void` | `writeTypeId(Object rawId)`
    `com.fasterxml.jackson.core.type.WritableTypeId` | `writeTypePrefix(com.fasterxml.jackson.core.type.WritableTypeId typeIdDef)`
    `void` | `writeUTF8String(byte[] buffer, int offset, int length)`
    `void` | `writeValue(com.amazon.ion.IonValue value)`
    `void` | `writeValue(com.amazon.ion.Timestamp value)`

    - ### Methods inherited from class com.fasterxml.jackson.core.base.GeneratorBase

      `_asString, _checkStdFeatureChanges, _constructDefaultPrettyPrinter, _decodeSurrogate, disable, enable, getCodec, getCurrentValue, getFeatureMask, getOutputContext, isEnabled, overrideStdFeatures, setCodec, setCurrentValue, setFeatureMask, useDefaultPrettyPrinter, writeBinary, writeFieldName, writeRawValue, writeStartObject, writeString, writeTree`

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

      `_copyCurrentContents, _reportError, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, canOmitFields, canUseSchema, canWriteFormattedNumbers, canWriteObjectId, configure, copyCurrentEvent, copyCurrentStructure, getCharacterEscapes, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getOutputTarget, getPrettyPrinter, getSchema, isEnabled, overrideFormatFeatures, setCharacterEscapes, setHighestNonEscapedChar, setPrettyPrinter, setRootValueSeparator, setSchema, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeEmbeddedObject, writeFieldId, writeNullField, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectId, writeObjectRef, writeOmittedField, writeRaw, writeStartArray, writeStartArray, writeStartArray, writeStartObject, writeString, writeStringField, writeTypeSuffix`

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

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

- - ### Field Detail

    - #### _writer

          protected final com.amazon.ion.IonWriter _writer

    - #### _ioContext

          protected final com.fasterxml.jackson.core.io.IOContext _ioContext

    - #### _destination

          protected final Closeable _destination

      Highest-level output abstraction we can use; either OutputStream or Writer.

  - ### Constructor Detail

    - #### IonGenerator

          public IonGenerator(int features,
                              com.fasterxml.jackson.core.ObjectCodec codec,
                              com.amazon.ion.IonWriter ion,
                              com.fasterxml.jackson.core.io.IOContext ctxt,
                              Closeable dst)

  - ### Method Detail

    - #### 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.base.GeneratorBase`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `com.fasterxml.jackson.core.base.GeneratorBase`
      Throws:
        `IOException`

    - #### flush

          public void flush()
                     throws IOException

      Specified by:
        `flush` in interface `Flushable`
      Specified by:
        `flush` in class `com.fasterxml.jackson.core.base.GeneratorBase`
      Throws:
        `IOException`

    - #### isClosed

          public boolean isClosed()

      Overrides:
        `isClosed` in class `com.fasterxml.jackson.core.base.GeneratorBase`

    - #### canWriteTypeId

          public boolean canWriteTypeId()

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

    - #### canWriteBinaryNatively

          public boolean canWriteBinaryNatively()

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

    - #### writeNumber

          public void writeNumber(int value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNumber

          public void writeNumber(long value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNumber

          public void writeNumber(BigInteger value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNumber

          public void writeNumber(double value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNumber

          public void writeNumber(float value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNumber

          public void writeNumber(BigDecimal value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNumber

          public void writeNumber(String value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException,
                                  UnsupportedOperationException

      Specified by:
        `writeNumber` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonGenerationException`
        `UnsupportedOperationException`

    - #### writeSymbol

          public void writeSymbol(String value)
                           throws com.fasterxml.jackson.core.JsonGenerationException,
                                  IOException

      Throws:
        `com.fasterxml.jackson.core.JsonGenerationException`
        `IOException`

    - #### annotateNextValue

          public void annotateNextValue(String annotation)

      Annotates the next structure or value written -- `stepIn()` or one of the `IonWriter`s `write*()` methods.
      Parameters:
        `annotation` - a type annotation
      See Also:
        `IonAnnotationTypeSerializer`

    - #### writeDate

          public void writeDate(Calendar value)
                         throws com.fasterxml.jackson.core.JsonGenerationException,
                                IOException

      Throws:
        `com.fasterxml.jackson.core.JsonGenerationException`
        `IOException`

    - #### writeString

          public void writeString(String value)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeString

          public void writeString(char[] buffer,
                                  int offset,
                                  int length)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeUTF8String

          public void writeUTF8String(byte[] buffer,
                                      int offset,
                                      int length)
                               throws IOException,
                                      com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeRaw

          public void writeRaw(String value)
                        throws IOException,
                               com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeRaw

          public void writeRaw(char value)
                        throws IOException,
                               com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeRaw

          public void writeRaw(String value,
                               int arg1,
                               int arg2)
                        throws IOException,
                               com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeRaw

          public void writeRaw(char[] value,
                               int arg1,
                               int arg2)
                        throws IOException,
                               com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeRawValue

          public void writeRawValue(String value)
                             throws IOException,
                                    com.fasterxml.jackson.core.JsonGenerationException

      Overrides:
        `writeRawValue` in class `com.fasterxml.jackson.core.base.GeneratorBase`
      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonGenerationException`

    - #### writeRawValue

          public void writeRawValue(String value,
                                    int arg1,
                                    int arg2)
                             throws IOException,
                                    com.fasterxml.jackson.core.JsonGenerationException

      Overrides:
        `writeRawValue` in class `com.fasterxml.jackson.core.base.GeneratorBase`
      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonGenerationException`

    - #### writeRawValue

          public void writeRawValue(char[] value,
                                    int arg1,
                                    int arg2)
                             throws IOException,
                                    com.fasterxml.jackson.core.JsonGenerationException

      Overrides:
        `writeRawValue` in class `com.fasterxml.jackson.core.base.GeneratorBase`
      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonGenerationException`

    - #### writeRawUTF8String

          public void writeRawUTF8String(byte[] text,
                                         int offset,
                                         int length)
                                  throws IOException,
                                         com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeBinary

          public void writeBinary(com.fasterxml.jackson.core.Base64Variant b64v,
                                  byte[] data,
                                  int offset,
                                  int length)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeBoolean

          public void writeBoolean(boolean value)
                            throws IOException,
                                   com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNull

          public void writeNull()
                         throws IOException,
                                com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeNull

          public void writeNull(com.amazon.ion.IonType ionType)
                         throws IOException,
                                com.fasterxml.jackson.core.JsonGenerationException

      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonGenerationException`

    - #### writeObject

          public void writeObject(Object pojo)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonProcessingException

      Overrides:
        `writeObject` in class `com.fasterxml.jackson.core.base.GeneratorBase`
      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonProcessingException`

    - #### writeValue

          public void writeValue(com.amazon.ion.IonValue value)
                          throws IOException

      Throws:
        `IOException`

    - #### writeValue

          public void writeValue(com.amazon.ion.Timestamp value)
                          throws IOException

      Throws:
        `IOException`

    - #### _releaseBuffers

          protected void _releaseBuffers()

      Specified by:
        `_releaseBuffers` in class `com.fasterxml.jackson.core.base.GeneratorBase`

    - #### _verifyValueWrite

          protected void _verifyValueWrite(String msg)
                                    throws IOException,
                                           com.fasterxml.jackson.core.JsonGenerationException

      Specified by:
        `_verifyValueWrite` in class `com.fasterxml.jackson.core.base.GeneratorBase`
      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonGenerationException`

    - #### writeEndArray

          public void writeEndArray()
                             throws IOException,
                                    com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeEndObject

          public void writeEndObject()
                              throws IOException,
                                     com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeFieldName

          public void writeFieldName(String value)
                              throws IOException,
                                     com.fasterxml.jackson.core.JsonGenerationException

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

    - #### _writeFieldName

          protected void _writeFieldName(String value)
                                  throws IOException,
                                         com.fasterxml.jackson.core.JsonGenerationException

      Throws:
        `IOException`
        `com.fasterxml.jackson.core.JsonGenerationException`

    - #### writeStartArray

          public void writeStartArray()
                               throws IOException,
                                      com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeStartObject

          public void writeStartObject()
                                throws IOException,
                                       com.fasterxml.jackson.core.JsonGenerationException

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

    - #### writeTypeId

          public void writeTypeId(Object rawId)
                           throws IOException

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

    - #### writeTypePrefix

          public com.fasterxml.jackson.core.type.WritableTypeId writeTypePrefix(com.fasterxml.jackson.core.type.WritableTypeId typeIdDef)
                                                                         throws IOException

      Overrides:
        `writeTypePrefix` in class `com.fasterxml.jackson.core.JsonGenerator`
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### _reportNoRaw

          protected void _reportNoRaw()
                               throws IOException

      Throws:
        `IOException`

Copyright © 2019 FasterXML. All rights reserved.