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.JsonGeneratorUtility class used for efficient storage ofJsonTokensequences, 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 classTokenBuffer.Parserprotected static classTokenBuffer.SegmentIndividual 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_appendAtOffset within last segment,protected boolean_closedprotected TokenBuffer.Segment_firstFirst segment, for contents this buffer hasprotected boolean_forceBigDecimalFlag set during construction, if use ofBigDecimalis to be forced on all floating-point values.protected int_generatorFeaturesBit flag composed of bits that indicate whichJsonGenerator.Features are enabled.protected boolean_hasNativeIdDo we currently have a native type or object id buffered?protected boolean_hasNativeObjectIdsprotected boolean_hasNativeTypeIdsprotected TokenBuffer.Segment_lastLast segment of this buffer, one that is used for appending more tokensprotected boolean_mayHaveNativeIdsprotected com.fasterxml.jackson.core.ObjectCodec_objectCodecObject codec to use for stream-based object conversion through parser/generator interfaces.protected java.lang.Object_objectIdIf native object ids supported, this is the id for following value (or first token of one) to be written.protected com.fasterxml.jackson.core.JsonStreamContext_parentContextParse context from "parent" parser (one from which content to buffer is read, if specified).protected com.fasterxml.jackson.core.StreamReadConstraints_streamReadConstraintsprotected java.lang.Object_typeIdIf 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_writeContextprotected static intDEFAULT_GENERATOR_FEATURES
-
Constructor Summary
Constructors Constructor Description TokenBuffer(com.fasterxml.jackson.core.JsonParser p)TokenBuffer(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt)TokenBuffer(com.fasterxml.jackson.core.ObjectCodec codec, boolean hasNativeIds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void_appendEndMarker(com.fasterxml.jackson.core.JsonToken type)Specialized method used for appending a structural end Object/Array markerprotected void_appendFieldName(java.lang.Object value)Specialized method used for appending a field name, appending eitherStringorSerializableString.protected void_appendStartMarker(com.fasterxml.jackson.core.JsonToken type)Specialized method used for appending a structural start Object/Array markerprotected void_appendValue(com.fasterxml.jackson.core.JsonToken type)Method used for appending token known to represent a "simple" scalar value where token is the only informationprotected void_appendValue(com.fasterxml.jackson.core.JsonToken type, java.lang.Object value)Method used for appending token known to represent a scalar value where there is additional content (text, number) beyond type tokenprotected void_copyBufferContents(com.fasterxml.jackson.core.JsonParser p)protected void_reportUnsupportedOperation()TokenBufferappend(TokenBuffer other)Helper method that will append contents of given buffer into this buffer.static TokenBufferasCopyOfValue(com.fasterxml.jackson.core.JsonParser p)Deprecated.Since 2.13: useDeserializationContext.bufferAsCopyOfValue(com.fasterxml.jackson.core.JsonParser)instead.com.fasterxml.jackson.core.JsonParserasParser()Method used to create aJsonParserthat can read contents stored in this buffer.com.fasterxml.jackson.core.JsonParserasParser(com.fasterxml.jackson.core.JsonParser src)com.fasterxml.jackson.core.JsonParserasParser(com.fasterxml.jackson.core.ObjectCodec codec)Method used to create aJsonParserthat can read contents stored in this buffer.com.fasterxml.jackson.core.JsonParserasParser(com.fasterxml.jackson.core.StreamReadConstraints streamReadConstraints)com.fasterxml.jackson.core.JsonParserasParserOnFirstToken()Same as:booleancanWriteBinaryNatively()Since we can efficiently storebyte[], yes.booleancanWriteObjectId()booleancanWriteTypeId()voidclose()voidcopyCurrentEvent(com.fasterxml.jackson.core.JsonParser p)voidcopyCurrentStructure(com.fasterxml.jackson.core.JsonParser p)TokenBufferdeserialize(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt)Helper method used by standard deserializer.com.fasterxml.jackson.core.JsonGeneratordisable(com.fasterxml.jackson.core.JsonGenerator.Feature f)com.fasterxml.jackson.core.JsonGeneratorenable(com.fasterxml.jackson.core.JsonGenerator.Feature f)com.fasterxml.jackson.core.JsonTokenfirstToken()voidflush()TokenBufferforceUseOfBigDecimal(boolean b)com.fasterxml.jackson.core.ObjectCodecgetCodec()intgetFeatureMask()com.fasterxml.jackson.core.json.JsonWriteContextgetOutputContext()com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamWriteCapability>getWriteCapabilities()booleanisClosed()booleanisEmpty()Accessor for checking whether this buffer has one or more tokens or not.booleanisEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f)TokenBufferoverrideParentContext(com.fasterxml.jackson.core.JsonStreamContext ctxt)Method that allows explicitly specifying parent parse context to associate with contents of this buffer.com.fasterxml.jackson.core.JsonGeneratoroverrideStdFeatures(int values, int mask)voidserialize(com.fasterxml.jackson.core.JsonGenerator gen)Helper method that will write all contents of this buffer using givenJsonGenerator.com.fasterxml.jackson.core.JsonGeneratorsetCodec(com.fasterxml.jackson.core.ObjectCodec oc)com.fasterxml.jackson.core.JsonGeneratorsetFeatureMask(int mask)Deprecated.java.lang.StringtoString()com.fasterxml.jackson.core.JsonGeneratoruseDefaultPrettyPrinter()com.fasterxml.jackson.core.Versionversion()voidwriteBinary(com.fasterxml.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len)intwriteBinary(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 cannot make good use of streaming because buffer must hold all the data.voidwriteBoolean(boolean state)voidwriteEmbeddedObject(java.lang.Object object)voidwriteEndArray()voidwriteEndObject()voidwriteFieldName(com.fasterxml.jackson.core.SerializableString name)voidwriteFieldName(java.lang.String name)voidwriteNull()voidwriteNumber(double d)voidwriteNumber(float f)voidwriteNumber(int i)voidwriteNumber(long l)voidwriteNumber(short i)voidwriteNumber(java.lang.String encodedValue)voidwriteNumber(java.math.BigDecimal dec)voidwriteNumber(java.math.BigInteger v)voidwriteObject(java.lang.Object value)voidwriteObjectId(java.lang.Object id)voidwriteRaw(char c)voidwriteRaw(char[] text, int offset, int len)voidwriteRaw(com.fasterxml.jackson.core.SerializableString text)voidwriteRaw(java.lang.String text)voidwriteRaw(java.lang.String text, int offset, int len)voidwriteRawUTF8String(byte[] text, int offset, int length)voidwriteRawValue(char[] text, int offset, int len)voidwriteRawValue(java.lang.String text)voidwriteRawValue(java.lang.String text, int offset, int len)voidwriteStartArray()voidwriteStartArray(java.lang.Object forValue)voidwriteStartArray(java.lang.Object forValue, int size)voidwriteStartObject()voidwriteStartObject(java.lang.Object forValue)voidwriteStartObject(java.lang.Object forValue, int size)voidwriteString(char[] text, int offset, int len)voidwriteString(com.fasterxml.jackson.core.SerializableString text)voidwriteString(java.io.Reader reader, int len)voidwriteString(java.lang.String text)voidwriteTree(com.fasterxml.jackson.core.TreeNode node)voidwriteTypeId(java.lang.Object id)voidwriteUTF8String(byte[] text, int offset, int length)-
Methods inherited from class com.fasterxml.jackson.core.JsonGenerator
_constructWriteException, _constructWriteException, _constructWriteException, _constructWriteException, _copyCurrentContents, _copyCurrentFloatValue, _copyCurrentFloatValueExact, _copyCurrentIntValue, _copyCurrentStringValue, _reportError, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, assignCurrentValue, canOmitFields, canUseSchema, canWriteFormattedNumbers, configure, copyCurrentEventExact, currentValue, getCharacterEscapes, getCurrentValue, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getOutputTarget, getPrettyPrinter, getSchema, isEnabled, overrideFormatFeatures, setCharacterEscapes, setCurrentValue, setHighestNonEscapedChar, setPrettyPrinter, setRootValueSeparator, setSchema, streamWriteConstraints, writeArray, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeFieldId, writeNullField, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectRef, writeOmittedField, writePOJO, writePOJOField, writeRawValue, writeStartArray, writeStringField, writeTypePrefix, writeTypeSuffix
-
-
-
-
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 cannot be used.
-
_parentContext
protected com.fasterxml.jackson.core.JsonStreamContext _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.
-
_generatorFeatures
protected int _generatorFeatures
Bit flag composed of bits that indicate whichJsonGenerator.Features are enabled.NOTE: most features have no effect on this class
-
_streamReadConstraints
protected com.fasterxml.jackson.core.StreamReadConstraints _streamReadConstraints
- Since:
- 2.15
-
_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 ofBigDecimalis 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
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 cannot be used.hasNativeIds- Whether resultingJsonParser(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
-
asCopyOfValue
@Deprecated public static TokenBuffer asCopyOfValue(com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException
Deprecated.Since 2.13: useDeserializationContext.bufferAsCopyOfValue(com.fasterxml.jackson.core.JsonParser)instead.Convenience method, equivalent to:TokenBuffer b = new TokenBuffer(p); b.copyCurrentStructure(p); return b;
- Throws:
java.io.IOException- Since:
- 2.9
-
overrideParentContext
public TokenBuffer overrideParentContext(com.fasterxml.jackson.core.JsonStreamContext 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.- Since:
- 2.9
-
forceUseOfBigDecimal
public TokenBuffer forceUseOfBigDecimal(boolean b)
- Since:
- 2.7
-
version
public com.fasterxml.jackson.core.Version version()
- Specified by:
versionin interfacecom.fasterxml.jackson.core.Versioned- Specified by:
versionin classcom.fasterxml.jackson.core.JsonGenerator
-
asParser
public com.fasterxml.jackson.core.JsonParser asParser()
Method used to create aJsonParserthat can read contents stored in this buffer. Will use default_objectCodecfor 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
-
asParserOnFirstToken
public com.fasterxml.jackson.core.JsonParser asParserOnFirstToken() throws java.io.IOExceptionSame as:JsonParser p = asParser(); p.nextToken(); return p;
- Throws:
java.io.IOException- Since:
- 2.9
-
asParser
public com.fasterxml.jackson.core.JsonParser asParser(com.fasterxml.jackson.core.ObjectCodec codec)
Method used to create aJsonParserthat 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 cannot 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.StreamReadConstraints streamReadConstraints)
- Parameters:
streamReadConstraints- constraints for streaming reads- Since:
- v2.15
-
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, streamReadConstraints
-
firstToken
public com.fasterxml.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) 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.IOExceptionHelper method that will write all contents of this buffer using givenJsonGenerator.Note: this method would be enough to implement
JsonSerializerforTokenBuffertype; but we cannot have upwards references (from core to mapper package); and as such we also cannot 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:
toStringin classjava.lang.Object
-
enable
public com.fasterxml.jackson.core.JsonGenerator enable(com.fasterxml.jackson.core.JsonGenerator.Feature f)
- Specified by:
enablein classcom.fasterxml.jackson.core.JsonGenerator
-
disable
public com.fasterxml.jackson.core.JsonGenerator disable(com.fasterxml.jackson.core.JsonGenerator.Feature f)
- Specified by:
disablein classcom.fasterxml.jackson.core.JsonGenerator
-
isEnabled
public boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f)
- Specified by:
isEnabledin classcom.fasterxml.jackson.core.JsonGenerator
-
getFeatureMask
public int getFeatureMask()
- Specified by:
getFeatureMaskin classcom.fasterxml.jackson.core.JsonGenerator
-
setFeatureMask
@Deprecated public com.fasterxml.jackson.core.JsonGenerator setFeatureMask(int mask)
Deprecated.- Specified by:
setFeatureMaskin classcom.fasterxml.jackson.core.JsonGenerator
-
overrideStdFeatures
public com.fasterxml.jackson.core.JsonGenerator overrideStdFeatures(int values, int mask)- Overrides:
overrideStdFeaturesin classcom.fasterxml.jackson.core.JsonGenerator
-
useDefaultPrettyPrinter
public com.fasterxml.jackson.core.JsonGenerator useDefaultPrettyPrinter()
- Specified by:
useDefaultPrettyPrinterin classcom.fasterxml.jackson.core.JsonGenerator
-
setCodec
public com.fasterxml.jackson.core.JsonGenerator setCodec(com.fasterxml.jackson.core.ObjectCodec oc)
- Specified by:
setCodecin classcom.fasterxml.jackson.core.JsonGenerator
-
getCodec
public com.fasterxml.jackson.core.ObjectCodec getCodec()
- Specified by:
getCodecin classcom.fasterxml.jackson.core.JsonGenerator
-
getOutputContext
public final com.fasterxml.jackson.core.json.JsonWriteContext getOutputContext()
- Specified by:
getOutputContextin classcom.fasterxml.jackson.core.JsonGenerator
-
canWriteBinaryNatively
public boolean canWriteBinaryNatively()
Since we can efficiently storebyte[], yes.- Overrides:
canWriteBinaryNativelyin classcom.fasterxml.jackson.core.JsonGenerator
-
getWriteCapabilities
public com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamWriteCapability> getWriteCapabilities()
- Overrides:
getWriteCapabilitiesin classcom.fasterxml.jackson.core.JsonGenerator
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin classcom.fasterxml.jackson.core.JsonGenerator
-
writeStartArray
public final void writeStartArray() throws java.io.IOException- Specified by:
writeStartArrayin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeStartArray
public void writeStartArray(java.lang.Object forValue) throws java.io.IOException- Overrides:
writeStartArrayin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeStartArray
public void writeStartArray(java.lang.Object forValue, int size) throws java.io.IOException- Overrides:
writeStartArrayin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeEndArray
public final void writeEndArray() throws java.io.IOException- Specified by:
writeEndArrayin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeStartObject
public final void writeStartObject() throws java.io.IOException- Specified by:
writeStartObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeStartObject
public void writeStartObject(java.lang.Object forValue) throws java.io.IOException- Overrides:
writeStartObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeStartObject
public void writeStartObject(java.lang.Object forValue, int size) throws java.io.IOException- Overrides:
writeStartObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeEndObject
public final void writeEndObject() throws java.io.IOException- Specified by:
writeEndObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeFieldName
public final void writeFieldName(java.lang.String name) throws java.io.IOException- Specified by:
writeFieldNamein classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeFieldName
public void writeFieldName(com.fasterxml.jackson.core.SerializableString name) throws java.io.IOException- Specified by:
writeFieldNamein classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(java.lang.String text) throws java.io.IOException- Specified by:
writeStringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(char[] text, int offset, int len) throws java.io.IOException- Specified by:
writeStringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(com.fasterxml.jackson.core.SerializableString text) throws java.io.IOException- Specified by:
writeStringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(java.io.Reader reader, int len) throws java.io.IOException- Overrides:
writeStringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRawUTF8String
public void writeRawUTF8String(byte[] text, int offset, int length) throws java.io.IOException- Specified by:
writeRawUTF8Stringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeUTF8String
public void writeUTF8String(byte[] text, int offset, int length) throws java.io.IOException- Specified by:
writeUTF8Stringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(java.lang.String text) throws java.io.IOException- Specified by:
writeRawin classcom.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:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(com.fasterxml.jackson.core.SerializableString text) throws java.io.IOException- Overrides:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(char[] text, int offset, int len) throws java.io.IOException- Specified by:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(char c) throws java.io.IOException- Specified by:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRawValue
public void writeRawValue(java.lang.String text) throws java.io.IOException- Specified by:
writeRawValuein classcom.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:
writeRawValuein classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRawValue
public void writeRawValue(char[] text, int offset, int len) throws java.io.IOException- Specified by:
writeRawValuein classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(short i) throws java.io.IOException- Overrides:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(int i) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(long l) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(double d) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(float f) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.math.BigDecimal dec) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.math.BigInteger v) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.lang.String encodedValue) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeBoolean
public void writeBoolean(boolean state) throws java.io.IOException- Specified by:
writeBooleanin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNull
public void writeNull() throws java.io.IOException- Specified by:
writeNullin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeObject
public void writeObject(java.lang.Object value) throws java.io.IOException- Specified by:
writeObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeTree
public void writeTree(com.fasterxml.jackson.core.TreeNode node) throws java.io.IOException- Specified by:
writeTreein classcom.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:
writeBinaryin classcom.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 cannot make good use of streaming because buffer must hold all the data. Because of this, currently this will simply throwUnsupportedOperationException- Specified by:
writeBinaryin classcom.fasterxml.jackson.core.JsonGenerator
-
canWriteTypeId
public boolean canWriteTypeId()
- Overrides:
canWriteTypeIdin classcom.fasterxml.jackson.core.JsonGenerator
-
canWriteObjectId
public boolean canWriteObjectId()
- Overrides:
canWriteObjectIdin classcom.fasterxml.jackson.core.JsonGenerator
-
writeTypeId
public void writeTypeId(java.lang.Object id)
- Overrides:
writeTypeIdin classcom.fasterxml.jackson.core.JsonGenerator
-
writeObjectId
public void writeObjectId(java.lang.Object id)
- Overrides:
writeObjectIdin classcom.fasterxml.jackson.core.JsonGenerator
-
writeEmbeddedObject
public void writeEmbeddedObject(java.lang.Object object) throws java.io.IOException- Overrides:
writeEmbeddedObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
copyCurrentEvent
public void copyCurrentEvent(com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException- Overrides:
copyCurrentEventin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
copyCurrentStructure
public void copyCurrentStructure(com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException- Overrides:
copyCurrentStructurein classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
_copyBufferContents
protected void _copyBufferContents(com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException- Throws:
java.io.IOException
-
_appendValue
protected final void _appendValue(com.fasterxml.jackson.core.JsonToken type)
Method used for appending token known to represent a "simple" scalar value where token is the only information- Since:
- 2.6.4
-
_appendValue
protected final void _appendValue(com.fasterxml.jackson.core.JsonToken type, java.lang.Object value)Method used for appending token known to represent a scalar value where there is additional content (text, number) beyond type token- Since:
- 2.6.4
-
_appendFieldName
protected final void _appendFieldName(java.lang.Object value)
Specialized method used for appending a field name, appending eitherStringorSerializableString.- Since:
- 2.10
-
_appendStartMarker
protected final void _appendStartMarker(com.fasterxml.jackson.core.JsonToken type)
Specialized method used for appending a structural start Object/Array marker- Since:
- 2.10
-
_appendEndMarker
protected final void _appendEndMarker(com.fasterxml.jackson.core.JsonToken type)
Specialized method used for appending a structural end Object/Array marker- Since:
- 2.10
-
_reportUnsupportedOperation
protected void _reportUnsupportedOperation()
- Overrides:
_reportUnsupportedOperationin classcom.fasterxml.jackson.core.JsonGenerator
-
-