Class TokenBuffer

java.lang.Object
tools.jackson.core.JsonGenerator
tools.jackson.databind.util.TokenBuffer
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, tools.jackson.core.Versioned

public class TokenBuffer extends tools.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.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static final class 
     
    protected static final class 
    Individual segment of TokenBuffer that can store up to 16 tokens (limited by 4 bits per token type marker requirement).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    Offset within last segment,
    protected boolean
     
    First segment, for contents this buffer has
    protected boolean
    Flag set during construction, if use of BigDecimal is to be forced on all floating-point values.
    protected boolean
    Do we currently have a native type or object id buffered?
    protected boolean
     
    protected boolean
     
    Last segment of this buffer, one that is used for appending more tokens
    protected boolean
     
    protected Object
    If native object ids supported, this is the id for following value (or first token of one) to be written.
    protected tools.jackson.core.ObjectWriteContext
     
    protected tools.jackson.core.TokenStreamContext
    Parse context from "parent" parser (one from which content to buffer is read, if specified).
    protected final tools.jackson.core.StreamReadConstraints
     
    protected int
    Bit flag composed of bits that indicate which StreamWriteFeatures are enabled.
    protected tools.jackson.core.util.SimpleStreamWriteContext
     
    protected Object
    If native type ids supported, this is the id for following value (or first token of one) to be written.
    protected static final tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamWriteCapability>
     
    protected static final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    TokenBuffer(boolean hasNativeIds)
    Deprecated.
    protected
    TokenBuffer(tools.jackson.core.JsonParser p, tools.jackson.core.ObjectReadContext ctxt)
     
     
    TokenBuffer(tools.jackson.core.ObjectWriteContext writeContext, boolean hasNativeIds)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final void
    _appendEndMarker(tools.jackson.core.JsonToken type)
    Specialized method used for appending a structural end Object/Array marker
    protected final void
     
    protected final void
    _appendStartMarker(tools.jackson.core.JsonToken type)
    Specialized method used for appending a structural start Object/Array marker
    protected final void
    _appendValue(tools.jackson.core.JsonToken type)
    Method used for appending token known to represent a "simple" scalar value where token is the only information
    protected final void
    _appendValue(tools.jackson.core.JsonToken type, Object value)
    Method used for appending token known to represent a scalar value where there is additional content (text, number) beyond type token
    protected void
    _copyBufferContents(tools.jackson.core.JsonParser p)
     
    protected <T> T
     
    Helper method that will append contents of given buffer into this buffer.
    tools.jackson.core.JsonParser
    Method used to create a JsonParser that can read contents stored in this buffer.
    tools.jackson.core.JsonParser
    asParser(tools.jackson.core.ObjectReadContext readCtxt)
    Method used to create a JsonParser that can read contents stored in this buffer.
    tools.jackson.core.JsonParser
    asParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.JsonParser p0)
     
    tools.jackson.core.JsonParser
    asParserOnFirstToken(tools.jackson.core.ObjectReadContext readCtxt)
    Same as:
    tools.jackson.core.JsonParser
    asParserOnFirstToken(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.JsonParser src)
     
    void
     
    boolean
     
    boolean
     
    void
     
    tools.jackson.core.JsonGenerator
    configure(tools.jackson.core.StreamWriteFeature f, boolean state)
     
    void
    copyCurrentEvent(tools.jackson.core.JsonParser p)
     
    void
    copyCurrentStructure(tools.jackson.core.JsonParser p)
     
     
    deserialize(tools.jackson.core.JsonParser p, DeserializationContext ctxt)
    Helper method used by standard deserializer.
    tools.jackson.core.JsonToken
     
    void
     
    forBuffering(tools.jackson.core.JsonParser p, tools.jackson.core.ObjectReadContext ctxt)
    Specialized factory method used when we are specifically buffering contents of a token stream for further processing.
     
    Specialized factory method used when we are generating token stream for further processing without tokens coming from specific input token stream.
    boolean
     
    boolean
    Accessor for checking whether this buffer has one or more tokens or not.
    boolean
    isEnabled(tools.jackson.core.StreamWriteFeature f)
     
    tools.jackson.core.ObjectWriteContext
     
    overrideParentContext(tools.jackson.core.TokenStreamContext ctxt)
    Method that allows explicitly specifying parent parse context to associate with contents of this buffer.
    void
    serialize(tools.jackson.core.JsonGenerator gen)
    Helper method that will write all contents of this buffer using given JsonGenerator.
    tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamWriteCapability>
     
    tools.jackson.core.TokenStreamContext
     
    int
     
    int
     
     
     
    tools.jackson.core.Version
     
    tools.jackson.core.JsonGenerator
    writeBinary(tools.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len)
     
    int
    writeBinary(tools.jackson.core.Base64Variant b64variant, InputStream data, int dataLength)
    Although we could support this method, it does not necessarily make sense: we cannot make good use of streaming because buffer must hold all the data.
    tools.jackson.core.JsonGenerator
    writeBoolean(boolean state)
     
    tools.jackson.core.JsonGenerator
     
    final tools.jackson.core.JsonGenerator
     
    final tools.jackson.core.JsonGenerator
     
    final tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writeName(tools.jackson.core.SerializableString name)
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writeNumber(double d)
     
    tools.jackson.core.JsonGenerator
    writeNumber(float f)
     
    tools.jackson.core.JsonGenerator
    writeNumber(int i)
     
    tools.jackson.core.JsonGenerator
    writeNumber(long l)
     
    tools.jackson.core.JsonGenerator
    writeNumber(short i)
     
    tools.jackson.core.JsonGenerator
    writeNumber(String encodedValue)
     
    void
    writeNumber(String encodedValue, boolean isInteger)
    Write method that can be used for custom numeric types that can not be (easily?)
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writePropertyId(long id)
     
    tools.jackson.core.JsonGenerator
    writeRaw(char c)
     
    tools.jackson.core.JsonGenerator
    writeRaw(char[] text, int offset, int len)
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writeRaw(String text, int offset, int len)
     
    tools.jackson.core.JsonGenerator
    writeRaw(tools.jackson.core.SerializableString text)
     
    tools.jackson.core.JsonGenerator
    writeRawUTF8String(byte[] text, int offset, int length)
     
    tools.jackson.core.JsonGenerator
    writeRawValue(char[] text, int offset, int len)
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writeRawValue(String text, int offset, int len)
     
    final tools.jackson.core.JsonGenerator
     
    final tools.jackson.core.JsonGenerator
     
    final tools.jackson.core.JsonGenerator
    writeStartArray(Object forValue, int len)
     
    final tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writeStartObject(Object forValue, int size)
     
    tools.jackson.core.JsonGenerator
    writeString(char[] text, int offset, int len)
     
    tools.jackson.core.JsonGenerator
    writeString(Reader reader, int len)
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writeString(tools.jackson.core.SerializableString text)
     
    tools.jackson.core.JsonGenerator
    writeTree(tools.jackson.core.TreeNode node)
     
    tools.jackson.core.JsonGenerator
     
    tools.jackson.core.JsonGenerator
    writeUTF8String(byte[] text, int offset, int length)
     

    Methods inherited from class tools.jackson.core.JsonGenerator

    _constructWriteException, _constructWriteException, _constructWriteException, _constructWriteException, _copyCurrentContents, _copyCurrentFloatValue, _copyCurrentFloatValueExact, _copyCurrentIntValue, _copyCurrentStringValue, _reportArgumentError, _reportError, _reportUnsupportedOperation, _verifyOffsets, _wrapIOFailure, _writeTypePrefixUsingNative, _writeTypePrefixUsingWrapper, canOmitProperties, copyCurrentEventExact, getCharacterEscapes, getHighestNonEscapedChar, getSchema, setCharacterEscapes, streamWriteConstraints, writeArray, writeArray, writeArray, writeArray, writeArrayPropertyStart, writeBinary, writeBinary, writeBinary, writeBinaryProperty, writeBooleanProperty, writeNullProperty, writeNumber, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeObjectPropertyStart, writeObjectRef, writeOmittedProperty, writePOJOProperty, writeRawValue, writeStringProperty, writeTypePrefix, writeTypeSuffix

    Methods inherited from class java.lang.Object

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

    • DEFAULT_STREAM_WRITE_FEATURES

      protected static final int DEFAULT_STREAM_WRITE_FEATURES
    • BOGUS_WRITE_CAPABILITIES

      protected static final tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamWriteCapability> BOGUS_WRITE_CAPABILITIES
    • _parentContext

      protected tools.jackson.core.TokenStreamContext _parentContext
      Parse context from "parent" parser (one from which content to buffer is read, if specified). Used, if available, when reading content, to present full context as if content was read from the original parser: this is useful in error reporting and sometimes processing as well.
    • _streamWriteFeatures

      protected int _streamWriteFeatures
      Bit flag composed of bits that indicate which StreamWriteFeatures are enabled.

      NOTE: most features have no effect on this class

    • _streamReadConstraints

      protected final tools.jackson.core.StreamReadConstraints _streamReadConstraints
    • _closed

      protected boolean _closed
    • _hasNativeTypeIds

      protected boolean _hasNativeTypeIds
    • _hasNativeObjectIds

      protected boolean _hasNativeObjectIds
    • _mayHaveNativeIds

      protected boolean _mayHaveNativeIds
    • _forceBigDecimal

      protected boolean _forceBigDecimal
      Flag set during construction, if use of BigDecimal is to be forced on all floating-point values.
    • _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 Object _typeId
      If native type ids supported, this is the id for following value (or first token of one) to be written.
    • _objectId

      protected 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?
    • _tokenWriteContext

      protected tools.jackson.core.util.SimpleStreamWriteContext _tokenWriteContext
    • _objectWriteContext

      protected tools.jackson.core.ObjectWriteContext _objectWriteContext
      Since:
      3.0
  • Constructor Details

    • TokenBuffer

      @Deprecated public TokenBuffer(boolean hasNativeIds)
      Deprecated.
      Parameters:
      hasNativeIds - Whether resulting JsonParser (if created) is considered to support native type and object ids
    • TokenBuffer

      public TokenBuffer(tools.jackson.core.ObjectWriteContext writeContext, boolean hasNativeIds)
      Since:
      3.0
    • TokenBuffer

      protected TokenBuffer(tools.jackson.core.JsonParser p, tools.jackson.core.ObjectReadContext ctxt)
  • Method Details

    • forGeneration

      public static TokenBuffer forGeneration()
      Specialized factory method used when we are generating token stream for further processing without tokens coming from specific input token stream.
      Since:
      3.0
    • forBuffering

      public static TokenBuffer forBuffering(tools.jackson.core.JsonParser p, tools.jackson.core.ObjectReadContext ctxt)
      Specialized factory method used when we are specifically buffering contents of a token stream for further processing.
      Since:
      3.0
    • overrideParentContext

      public TokenBuffer overrideParentContext(tools.jackson.core.TokenStreamContext ctxt)
      Method that allows explicitly specifying parent parse context to associate with contents of this buffer. Usually context is assigned at construction, based on given parser; but it is not always available, and may not contain intended context.
    • forceUseOfBigDecimal

      public TokenBuffer forceUseOfBigDecimal(boolean b)
    • asParser

      public tools.jackson.core.JsonParser asParser()
      Method used to create a JsonParser that can read contents stored in this buffer. Will create an "empty" read context (see ObjectReadContext.empty() which often is not what you want.

      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 tools.jackson.core.JsonParser asParser(tools.jackson.core.ObjectReadContext readCtxt)
      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:
      readCtxt - Active read context to use.
      Returns:
      Parser that can be used for reading contents stored in this buffer
    • asParser

      public tools.jackson.core.JsonParser asParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.JsonParser p0)
      Parameters:
      p0 - Parser to use for accessing source information like location, configured codec, streamReadConstraints
    • asParserOnFirstToken

      public tools.jackson.core.JsonParser asParserOnFirstToken(tools.jackson.core.ObjectReadContext readCtxt) throws tools.jackson.core.JacksonException
      Same as:
        JsonParser p = asParser(readCtxt);
        p.nextToken();
        return p;
      
      Throws:
      tools.jackson.core.JacksonException
    • asParserOnFirstToken

      public tools.jackson.core.JsonParser asParserOnFirstToken(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.JsonParser src) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • version

      public tools.jackson.core.Version version()
      Specified by:
      version in interface tools.jackson.core.Versioned
      Specified by:
      version in class tools.jackson.core.JsonGenerator
    • firstToken

      public tools.jackson.core.JsonToken firstToken()
    • isEmpty

      public boolean isEmpty()
      Accessor for checking whether this buffer has one or more tokens or not.
      Returns:
      True if this buffer instance has no tokens
      Since:
      2.13
    • append

      public TokenBuffer append(TokenBuffer other)
      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
    • serialize

      public void serialize(tools.jackson.core.JsonGenerator gen) throws tools.jackson.core.JacksonException
      Helper method that will write all contents of this buffer using given JsonGenerator.

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

      Throws:
      tools.jackson.core.JacksonException
    • deserialize

      public TokenBuffer deserialize(tools.jackson.core.JsonParser p, DeserializationContext ctxt) throws tools.jackson.core.JacksonException
      Helper method used by standard deserializer.
      Throws:
      tools.jackson.core.JacksonException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • streamWriteContext

      public tools.jackson.core.TokenStreamContext streamWriteContext()
      Specified by:
      streamWriteContext in class tools.jackson.core.JsonGenerator
    • currentValue

      public Object currentValue()
      Specified by:
      currentValue in class tools.jackson.core.JsonGenerator
    • assignCurrentValue

      public void assignCurrentValue(Object v)
      Specified by:
      assignCurrentValue in class tools.jackson.core.JsonGenerator
    • objectWriteContext

      public tools.jackson.core.ObjectWriteContext objectWriteContext()
      Specified by:
      objectWriteContext in class tools.jackson.core.JsonGenerator
    • configure

      public tools.jackson.core.JsonGenerator configure(tools.jackson.core.StreamWriteFeature f, boolean state)
      Specified by:
      configure in class tools.jackson.core.JsonGenerator
    • isEnabled

      public boolean isEnabled(tools.jackson.core.StreamWriteFeature f)
      Specified by:
      isEnabled in class tools.jackson.core.JsonGenerator
    • streamWriteFeatures

      public int streamWriteFeatures()
      Specified by:
      streamWriteFeatures in class tools.jackson.core.JsonGenerator
    • streamWriteCapabilities

      public tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamWriteCapability> streamWriteCapabilities()
      Specified by:
      streamWriteCapabilities in class tools.jackson.core.JsonGenerator
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Specified by:
      flush in class tools.jackson.core.JsonGenerator
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class tools.jackson.core.JsonGenerator
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in class tools.jackson.core.JsonGenerator
    • streamWriteOutputTarget

      public Object streamWriteOutputTarget()
      Specified by:
      streamWriteOutputTarget in class tools.jackson.core.JsonGenerator
    • streamWriteOutputBuffered

      public int streamWriteOutputBuffered()
      Specified by:
      streamWriteOutputBuffered in class tools.jackson.core.JsonGenerator
    • writeStartArray

      public final tools.jackson.core.JsonGenerator writeStartArray()
      Specified by:
      writeStartArray in class tools.jackson.core.JsonGenerator
    • writeStartArray

      public final tools.jackson.core.JsonGenerator writeStartArray(Object forValue)
      Specified by:
      writeStartArray in class tools.jackson.core.JsonGenerator
    • writeStartArray

      public final tools.jackson.core.JsonGenerator writeStartArray(Object forValue, int len)
      Specified by:
      writeStartArray in class tools.jackson.core.JsonGenerator
    • writeEndArray

      public final tools.jackson.core.JsonGenerator writeEndArray()
      Specified by:
      writeEndArray in class tools.jackson.core.JsonGenerator
    • writeStartObject

      public final tools.jackson.core.JsonGenerator writeStartObject()
      Specified by:
      writeStartObject in class tools.jackson.core.JsonGenerator
    • writeStartObject

      public tools.jackson.core.JsonGenerator writeStartObject(Object forValue)
      Specified by:
      writeStartObject in class tools.jackson.core.JsonGenerator
    • writeStartObject

      public tools.jackson.core.JsonGenerator writeStartObject(Object forValue, int size)
      Specified by:
      writeStartObject in class tools.jackson.core.JsonGenerator
    • writeEndObject

      public final tools.jackson.core.JsonGenerator writeEndObject()
      Specified by:
      writeEndObject in class tools.jackson.core.JsonGenerator
    • writeName

      public final tools.jackson.core.JsonGenerator writeName(String name)
      Specified by:
      writeName in class tools.jackson.core.JsonGenerator
    • writeName

      public tools.jackson.core.JsonGenerator writeName(tools.jackson.core.SerializableString name)
      Specified by:
      writeName in class tools.jackson.core.JsonGenerator
    • writePropertyId

      public tools.jackson.core.JsonGenerator writePropertyId(long id)
      Specified by:
      writePropertyId in class tools.jackson.core.JsonGenerator
    • writeString

      public tools.jackson.core.JsonGenerator writeString(String text)
      Specified by:
      writeString in class tools.jackson.core.JsonGenerator
    • writeString

      public tools.jackson.core.JsonGenerator writeString(char[] text, int offset, int len)
      Specified by:
      writeString in class tools.jackson.core.JsonGenerator
    • writeString

      public tools.jackson.core.JsonGenerator writeString(tools.jackson.core.SerializableString text)
      Specified by:
      writeString in class tools.jackson.core.JsonGenerator
    • writeString

      public tools.jackson.core.JsonGenerator writeString(Reader reader, int len)
      Specified by:
      writeString in class tools.jackson.core.JsonGenerator
    • writeRawUTF8String

      public tools.jackson.core.JsonGenerator writeRawUTF8String(byte[] text, int offset, int length)
      Specified by:
      writeRawUTF8String in class tools.jackson.core.JsonGenerator
    • writeUTF8String

      public tools.jackson.core.JsonGenerator writeUTF8String(byte[] text, int offset, int length)
      Specified by:
      writeUTF8String in class tools.jackson.core.JsonGenerator
    • writeRaw

      public tools.jackson.core.JsonGenerator writeRaw(String text)
      Specified by:
      writeRaw in class tools.jackson.core.JsonGenerator
    • writeRaw

      public tools.jackson.core.JsonGenerator writeRaw(String text, int offset, int len)
      Specified by:
      writeRaw in class tools.jackson.core.JsonGenerator
    • writeRaw

      public tools.jackson.core.JsonGenerator writeRaw(tools.jackson.core.SerializableString text)
      Overrides:
      writeRaw in class tools.jackson.core.JsonGenerator
    • writeRaw

      public tools.jackson.core.JsonGenerator writeRaw(char[] text, int offset, int len)
      Specified by:
      writeRaw in class tools.jackson.core.JsonGenerator
    • writeRaw

      public tools.jackson.core.JsonGenerator writeRaw(char c)
      Specified by:
      writeRaw in class tools.jackson.core.JsonGenerator
    • writeRawValue

      public tools.jackson.core.JsonGenerator writeRawValue(String text)
      Specified by:
      writeRawValue in class tools.jackson.core.JsonGenerator
    • writeRawValue

      public tools.jackson.core.JsonGenerator writeRawValue(String text, int offset, int len)
      Specified by:
      writeRawValue in class tools.jackson.core.JsonGenerator
    • writeRawValue

      public tools.jackson.core.JsonGenerator writeRawValue(char[] text, int offset, int len)
      Specified by:
      writeRawValue in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(short i)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(int i)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(long l)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(double d)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(float f)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(BigDecimal dec)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(BigInteger v)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public tools.jackson.core.JsonGenerator writeNumber(String encodedValue)
      Specified by:
      writeNumber in class tools.jackson.core.JsonGenerator
    • writeNumber

      public void writeNumber(String encodedValue, boolean isInteger) throws IOException
      Write method that can be used for custom numeric types that can not be (easily?) converted to "standard" Java number types. Because numbers are not surrounded by double quotes, regular writeString(java.lang.String) method can not be used; nor writeRaw(java.lang.String) because that does not properly handle value separators needed in Array or Object contexts.
      Parameters:
      encodedValue - Textual (possibly formatted) number representation to write
      isInteger - Whether value should be considered an integer
      Throws:
      IOException - if there is either an underlying I/O problem or encoding issue at format layer
      Since:
      2.18
    • writeBoolean

      public tools.jackson.core.JsonGenerator writeBoolean(boolean state)
      Specified by:
      writeBoolean in class tools.jackson.core.JsonGenerator
    • writeNull

      public tools.jackson.core.JsonGenerator writeNull()
      Specified by:
      writeNull in class tools.jackson.core.JsonGenerator
    • writePOJO

      public tools.jackson.core.JsonGenerator writePOJO(Object value)
      Specified by:
      writePOJO in class tools.jackson.core.JsonGenerator
    • writeTree

      public tools.jackson.core.JsonGenerator writeTree(tools.jackson.core.TreeNode node)
      Specified by:
      writeTree in class tools.jackson.core.JsonGenerator
    • writeBinary

      public tools.jackson.core.JsonGenerator writeBinary(tools.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len)
      Specified by:
      writeBinary in class tools.jackson.core.JsonGenerator
    • writeBinary

      public int writeBinary(tools.jackson.core.Base64Variant b64variant, InputStream data, int dataLength)
      Although we could support this method, it does not necessarily make sense: we cannot 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 tools.jackson.core.JsonGenerator
    • canWriteTypeId

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

      public boolean canWriteObjectId()
      Overrides:
      canWriteObjectId in class tools.jackson.core.JsonGenerator
    • writeTypeId

      public tools.jackson.core.JsonGenerator writeTypeId(Object id)
      Overrides:
      writeTypeId in class tools.jackson.core.JsonGenerator
    • writeObjectId

      public tools.jackson.core.JsonGenerator writeObjectId(Object id)
      Overrides:
      writeObjectId in class tools.jackson.core.JsonGenerator
    • writeEmbeddedObject

      public tools.jackson.core.JsonGenerator writeEmbeddedObject(Object object)
      Overrides:
      writeEmbeddedObject in class tools.jackson.core.JsonGenerator
    • copyCurrentEvent

      public void copyCurrentEvent(tools.jackson.core.JsonParser p)
      Overrides:
      copyCurrentEvent in class tools.jackson.core.JsonGenerator
    • copyCurrentStructure

      public void copyCurrentStructure(tools.jackson.core.JsonParser p)
      Overrides:
      copyCurrentStructure in class tools.jackson.core.JsonGenerator
    • _copyBufferContents

      protected void _copyBufferContents(tools.jackson.core.JsonParser p)
    • _appendValue

      protected final void _appendValue(tools.jackson.core.JsonToken type)
      Method used for appending token known to represent a "simple" scalar value where token is the only information
    • _appendValue

      protected final void _appendValue(tools.jackson.core.JsonToken type, Object value)
      Method used for appending token known to represent a scalar value where there is additional content (text, number) beyond type token
    • _appendName

      protected final void _appendName(Object value)
    • _appendStartMarker

      protected final void _appendStartMarker(tools.jackson.core.JsonToken type)
      Specialized method used for appending a structural start Object/Array marker
    • _appendEndMarker

      protected final void _appendEndMarker(tools.jackson.core.JsonToken type)
      Specialized method used for appending a structural end Object/Array marker
    • _reportUnsupportedOperation

      protected <T> T _reportUnsupportedOperation()
      Overrides:
      _reportUnsupportedOperation in class tools.jackson.core.JsonGenerator