Class TomlGenerator

java.lang.Object
com.fasterxml.jackson.core.JsonGenerator
com.fasterxml.jackson.core.base.GeneratorBase
com.fasterxml.jackson.dataformat.toml.TomlGenerator
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, Closeable, Flushable, AutoCloseable

final class TomlGenerator extends com.fasterxml.jackson.core.base.GeneratorBase
  • 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
    Description
    protected final StringBuilder
     
    protected final Writer
    Underlying Writer used for output.
    protected char[]
    Intermediate buffer in which contents are buffered before being written using _out.
    protected final int
    Offset to index after the last valid index in _outputBuffer.
    protected int
    Pointer to the next available location in _outputBuffer
    protected final com.fasterxml.jackson.core.StreamWriteConstraints
     
    Current context, in form we can use it (GeneratorBase has untyped reference; left as null)
    private final int
     
    protected static final int
     

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

    _cfgNumbersAsStrings, _closed, _features, _ioContext, _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, DEFAULT_BINARY_WRITE_CAPABILITIES, DEFAULT_TEXTUAL_WRITE_CAPABILITIES, DEFAULT_WRITE_CAPABILITIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    TomlGenerator(com.fasterxml.jackson.core.io.IOContext ioCtxt, int stdFeatures, int tomlFeatures, com.fasterxml.jackson.core.ObjectCodec codec, Writer out)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
    _verifyValueWrite(String typeMsg, boolean forceMaterializeKey)
     
    protected void
    _writeRaw(char c)
     
    protected void
    _writeRaw(char[] text, int offset, int len)
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    private void
    _writeStringImpl(int categoryMask, char[] text, int offset, int len)
     
    private void
    _writeStringImpl(int categoryMask, String name)
     
    void
     
    boolean
     
    boolean
     
    void
     
     
    void
     
    com.fasterxml.jackson.core.StreamWriteConstraints
     
    com.fasterxml.jackson.core.Version
     
    void
    writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len)
     
    void
    writeBoolean(boolean state)
     
    private void
     
    void
     
    void
     
    void
     
    void
     
    void
    writeNumber(double d)
     
    void
    writeNumber(float f)
     
    void
    writeNumber(int i)
     
    void
    writeNumber(long l)
     
    void
    writeNumber(short v)
     
    void
    writeNumber(String encodedValue)
     
    void
     
    void
     
    void
     
    void
    writeRaw(char c)
     
    void
    writeRaw(char[] text, int offset, int len)
     
    void
    writeRaw(com.fasterxml.jackson.core.SerializableString text)
     
    void
     
    void
    writeRaw(String text, int offset, int len)
     
    void
    writeRawUTF8String(byte[] text, int offset, int len)
     
    void
     
    void
     
    void
     
    void
     
    void
    writeString(char[] text, int offset, int len)
     
    void
     
    void
    writeUTF8String(byte[] text, int offset, int len)
     
    private void
     

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

    _asString, _checkRangeBoundsForByteArray, _checkRangeBoundsForCharArray, _checkRangeBoundsForString, _checkStdFeatureChanges, _constructDefaultPrettyPrinter, _decodeSurrogate, disable, enable, getCodec, getFeatureMask, getOutputContext, ioContext, isClosed, isEnabled, overrideStdFeatures, setCodec, setFeatureMask, useDefaultPrettyPrinter, writeBinary, writeFieldName, writeObject, writeRawValue, writeRawValue, writeRawValue, writeRawValue, writeString, writeTree

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

    _constructWriteException, _constructWriteException, _constructWriteException, _constructWriteException, _copyCurrentContents, _copyCurrentFloatValue, _copyCurrentFloatValueExact, _copyCurrentIntValue, _copyCurrentStringValue, _reportError, _reportUnsupportedOperation, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, canOmitFields, canUseSchema, canWriteBinaryNatively, canWriteFormattedNumbers, configure, copyCurrentEvent, copyCurrentEventExact, copyCurrentStructure, getCharacterEscapes, getCurrentValue, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getOutputTarget, getPrettyPrinter, getSchema, getWriteCapabilities, isEnabled, overrideFormatFeatures, setCharacterEscapes, setCurrentValue, setHighestNonEscapedChar, setPrettyPrinter, setRootValueSeparator, setSchema, writeArray, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeEmbeddedObject, writeFieldId, writeNullField, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectId, writeObjectRef, writeOmittedField, writePOJOField, writeStartArray, writeStartArray, writeStartObject, writeString, writeStringField, writeTypeId, writeTypePrefix, writeTypeSuffix

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SHORT_WRITE

      protected static final int SHORT_WRITE
      See Also:
    • _streamWriteConstraints

      protected final com.fasterxml.jackson.core.StreamWriteConstraints _streamWriteConstraints
      Since:
      2.16
    • _out

      protected final Writer _out
      Underlying Writer used for output.
    • _tomlFeatures

      private final int _tomlFeatures
    • _streamWriteContext

      protected TomlWriteContext _streamWriteContext
      Current context, in form we can use it (GeneratorBase has untyped reference; left as null)
    • _outputBuffer

      protected char[] _outputBuffer
      Intermediate buffer in which contents are buffered before being written using _out.
    • _outputTail

      protected int _outputTail
      Pointer to the next available location in _outputBuffer
    • _outputEnd

      protected final int _outputEnd
      Offset to index after the last valid index in _outputBuffer. Typically same as length of the buffer.
    • _basePath

      protected final StringBuilder _basePath
  • Constructor Details

    • TomlGenerator

      public TomlGenerator(com.fasterxml.jackson.core.io.IOContext ioCtxt, int stdFeatures, int tomlFeatures, com.fasterxml.jackson.core.ObjectCodec codec, Writer out)
  • Method Details

    • streamWriteConstraints

      public com.fasterxml.jackson.core.StreamWriteConstraints streamWriteConstraints()
      Overrides:
      streamWriteConstraints in class com.fasterxml.jackson.core.JsonGenerator
    • 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 AutoCloseable
      Specified by:
      close in interface Closeable
      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
    • _releaseBuffers

      protected void _releaseBuffers()
      Specified by:
      _releaseBuffers in class com.fasterxml.jackson.core.base.GeneratorBase
    • _flushBuffer

      protected void _flushBuffer() throws IOException
      Throws:
      IOException
    • _writeRaw

      protected void _writeRaw(char c) throws IOException
      Throws:
      IOException
    • _writeRaw

      protected void _writeRaw(String text) throws IOException
      Throws:
      IOException
    • _writeRaw

      protected void _writeRaw(StringBuilder text) throws IOException
      Throws:
      IOException
    • _writeRaw

      protected void _writeRaw(char[] text, int offset, int len) throws IOException
      Throws:
      IOException
    • _writeRawLong

      protected void _writeRawLong(String text) throws IOException
      Throws:
      IOException
    • _writeRawLong

      protected void _writeRawLong(StringBuilder text) throws IOException
      Throws:
      IOException
    • currentValue

      public Object currentValue()
      Overrides:
      currentValue in class com.fasterxml.jackson.core.base.GeneratorBase
    • assignCurrentValue

      public void assignCurrentValue(Object v)
      Overrides:
      assignCurrentValue in class com.fasterxml.jackson.core.base.GeneratorBase
    • canWriteObjectId

      public boolean canWriteObjectId()
      Overrides:
      canWriteObjectId in class com.fasterxml.jackson.core.JsonGenerator
    • canWriteTypeId

      public boolean canWriteTypeId()
      Overrides:
      canWriteTypeId in class com.fasterxml.jackson.core.JsonGenerator
    • writeFieldName

      public void writeFieldName(String name) throws IOException
      Specified by:
      writeFieldName in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeStartArray

      public void writeStartArray() throws IOException
      Specified by:
      writeStartArray in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeStartArray

      public void writeStartArray(Object currValue) throws IOException
      Overrides:
      writeStartArray in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeEndArray

      public void writeEndArray() throws IOException
      Specified by:
      writeEndArray in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeStartObject

      public void writeStartObject() throws IOException
      Specified by:
      writeStartObject in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeStartObject

      public void writeStartObject(Object forValue) throws IOException
      Overrides:
      writeStartObject in class com.fasterxml.jackson.core.base.GeneratorBase
      Throws:
      IOException
    • writeEndObject

      public void writeEndObject() throws IOException
      Specified by:
      writeEndObject in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeString

      public void writeString(String text) throws IOException
      Specified by:
      writeString in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeString

      public void writeString(char[] text, int offset, int len) throws IOException
      Specified by:
      writeString in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeRawUTF8String

      public void writeRawUTF8String(byte[] text, int offset, int len) throws IOException
      Specified by:
      writeRawUTF8String in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeUTF8String

      public void writeUTF8String(byte[] text, int offset, int len) throws IOException
      Specified by:
      writeUTF8String in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeRaw

      public void writeRaw(String text) throws IOException
      Specified by:
      writeRaw in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeRaw

      public void writeRaw(String text, int offset, int len) throws IOException
      Specified by:
      writeRaw in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeRaw

      public void writeRaw(char[] text, int offset, int len) throws IOException
      Specified by:
      writeRaw in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeRaw

      public void writeRaw(char c) throws IOException
      Specified by:
      writeRaw in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeRaw

      public void writeRaw(com.fasterxml.jackson.core.SerializableString text) throws IOException
      Overrides:
      writeRaw in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeBinary

      public void writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len) throws IOException
      Specified by:
      writeBinary in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeBoolean

      public void writeBoolean(boolean state) throws IOException
      Specified by:
      writeBoolean in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(short v) throws IOException
      Overrides:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(int i) throws IOException
      Specified by:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(long l) throws IOException
      Specified by:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(BigInteger v) throws IOException
      Specified by:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(double d) throws IOException
      Specified by:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(float f) throws IOException
      Specified by:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(BigDecimal dec) throws IOException
      Specified by:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNumber

      public void writeNumber(String encodedValue) throws IOException
      Specified by:
      writeNumber in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • writeNull

      public void writeNull() throws IOException
      Specified by:
      writeNull in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException
    • _verifyValueWrite

      protected void _verifyValueWrite(String typeMsg) throws IOException
      Specified by:
      _verifyValueWrite in class com.fasterxml.jackson.core.base.GeneratorBase
      Throws:
      IOException
    • _verifyValueWrite

      protected void _verifyValueWrite(String typeMsg, boolean forceMaterializeKey) throws IOException
      Throws:
      IOException
    • writeCurrentPath

      private void writeCurrentPath() throws IOException
      Throws:
      IOException
    • writeValueEnd

      private void writeValueEnd() throws IOException
      Throws:
      IOException
    • _appendPropertyName

      private void _appendPropertyName(StringBuilder path, String name) throws IOException
      Throws:
      IOException
    • _writeStringImpl

      private void _writeStringImpl(int categoryMask, String name) throws IOException
      Throws:
      IOException
    • _writeStringImpl

      private void _writeStringImpl(int categoryMask, char[] text, int offset, int len) throws IOException
      Throws:
      IOException
    • writePOJO

      public void writePOJO(Object value) throws IOException
      Overrides:
      writePOJO in class com.fasterxml.jackson.core.JsonGenerator
      Throws:
      IOException