Class WriterBackedGenerator
- java.lang.Object
-
- com.fasterxml.jackson.core.JsonGenerator
-
- com.fasterxml.jackson.core.base.GeneratorBase
-
- com.fasterxml.jackson.dataformat.javaprop.JavaPropsGenerator
-
- com.fasterxml.jackson.dataformat.javaprop.impl.WriterBackedGenerator
-
- All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned
,java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class WriterBackedGenerator extends JavaPropsGenerator
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.Writer
_out
UnderlyingWriter
used for output.protected char[]
_outputBuffer
Intermediate buffer in which contents are buffered before being written using_out
.protected int
_outputEnd
Offset to index after the last valid index in_outputBuffer
.protected int
_outputTail
Pointer to the next available location in_outputBuffer
-
Fields inherited from class com.fasterxml.jackson.dataformat.javaprop.JavaPropsGenerator
_basePath, _headerChecked, _indentLength, _ioContext, _jpropContext, _schema, BOGUS_WRITE_CONTEXT, SHORT_WRITE
-
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
-
-
Constructor Summary
Constructors Constructor Description WriterBackedGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, java.io.Writer out, int stdFeatures, com.fasterxml.jackson.core.ObjectCodec codec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_flushBuffer()
protected void
_releaseBuffers()
protected void
_writeEscaped(char[] text, int offset, int len)
protected void
_writeEscaped(java.lang.String value)
protected void
_writeEscapedEntry(char[] text, int offset, int len)
protected void
_writeEscapedEntry(java.lang.String value)
protected void
_writeLinefeed()
protected void
_writeRaw(char c)
protected void
_writeRaw(char[] text, int offset, int len)
protected void
_writeRaw(java.lang.String text)
protected void
_writeRaw(java.lang.StringBuilder text)
protected void
_writeRawLong(java.lang.String text)
protected void
_writeRawLong(java.lang.StringBuilder text)
protected void
_writeUnescapedEntry(java.lang.String value)
void
close()
void
flush()
java.lang.Object
getOutputTarget()
-
Methods inherited from class com.fasterxml.jackson.dataformat.javaprop.JavaPropsGenerator
_verifyValueWrite, canOmitFields, canUseSchema, canWriteBinaryNatively, canWriteFormattedNumbers, canWriteObjectId, canWriteTypeId, getCurrentValue, getOutputContext, getSchema, setCurrentValue, setPrettyPrinter, setSchema, useDefaultPrettyPrinter, version, writeBinary, writeBoolean, writeEndArray, writeEndObject, writeFieldName, writeNull, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeRaw, writeRaw, writeRaw, writeRaw, writeRaw, writeRawUTF8String, writeStartArray, writeStartObject, writeString, writeString, writeUTF8String
-
Methods inherited from class com.fasterxml.jackson.core.base.GeneratorBase
_asString, _checkStdFeatureChanges, _constructDefaultPrettyPrinter, _decodeSurrogate, disable, enable, getCodec, getFeatureMask, isClosed, isEnabled, overrideStdFeatures, setCodec, setFeatureMask, writeBinary, writeFieldName, writeObject, writeRawValue, writeRawValue, writeRawValue, writeRawValue, writeStartObject, writeString, writeTree
-
Methods inherited from class com.fasterxml.jackson.core.JsonGenerator
_copyCurrentContents, _reportError, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, configure, copyCurrentEvent, copyCurrentStructure, getCharacterEscapes, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getPrettyPrinter, isEnabled, overrideFormatFeatures, setCharacterEscapes, setHighestNonEscapedChar, setRootValueSeparator, writeArray, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeEmbeddedObject, writeFieldId, writeNullField, writeNumber, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectId, writeObjectRef, writeOmittedField, writeStartArray, writeStartArray, writeStartArray, writeStartObject, writeString, writeStringField, writeTypeId, writeTypePrefix, writeTypeSuffix
-
-
-
-
Field Detail
-
_out
protected final java.io.Writer _out
UnderlyingWriter
used for output.
-
_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.
-
-
Method Detail
-
getOutputTarget
public java.lang.Object getOutputTarget()
- Overrides:
getOutputTarget
in classcom.fasterxml.jackson.core.JsonGenerator
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classcom.fasterxml.jackson.core.base.GeneratorBase
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in classcom.fasterxml.jackson.core.base.GeneratorBase
- Throws:
java.io.IOException
-
_releaseBuffers
protected void _releaseBuffers()
- Specified by:
_releaseBuffers
in classcom.fasterxml.jackson.core.base.GeneratorBase
-
_flushBuffer
protected void _flushBuffer() throws java.io.IOException
- Throws:
java.io.IOException
-
_writeEscapedEntry
protected void _writeEscapedEntry(java.lang.String value) throws java.io.IOException
- Specified by:
_writeEscapedEntry
in classJavaPropsGenerator
- Throws:
java.io.IOException
-
_writeEscapedEntry
protected void _writeEscapedEntry(char[] text, int offset, int len) throws java.io.IOException
- Specified by:
_writeEscapedEntry
in classJavaPropsGenerator
- Throws:
java.io.IOException
-
_writeUnescapedEntry
protected void _writeUnescapedEntry(java.lang.String value) throws java.io.IOException
- Specified by:
_writeUnescapedEntry
in classJavaPropsGenerator
- Throws:
java.io.IOException
-
_writeEscaped
protected void _writeEscaped(java.lang.String value) throws java.io.IOException
- Throws:
java.io.IOException
-
_writeEscaped
protected void _writeEscaped(char[] text, int offset, int len) throws java.io.IOException
- Throws:
java.io.IOException
-
_writeLinefeed
protected void _writeLinefeed() throws java.io.IOException
- Throws:
java.io.IOException
-
_writeRaw
protected void _writeRaw(char c) throws java.io.IOException
- Specified by:
_writeRaw
in classJavaPropsGenerator
- Throws:
java.io.IOException
-
_writeRaw
protected void _writeRaw(java.lang.String text) throws java.io.IOException
- Specified by:
_writeRaw
in classJavaPropsGenerator
- Throws:
java.io.IOException
-
_writeRaw
protected void _writeRaw(java.lang.StringBuilder text) throws java.io.IOException
- Specified by:
_writeRaw
in classJavaPropsGenerator
- Throws:
java.io.IOException
-
_writeRaw
protected void _writeRaw(char[] text, int offset, int len) throws java.io.IOException
- Specified by:
_writeRaw
in classJavaPropsGenerator
- Throws:
java.io.IOException
-
_writeRawLong
protected void _writeRawLong(java.lang.String text) throws java.io.IOException
- Throws:
java.io.IOException
-
_writeRawLong
protected void _writeRawLong(java.lang.StringBuilder text) throws java.io.IOException
- Throws:
java.io.IOException
-
-