Top Fields Constructors Methods
tools.jackson.dataformat.javaprop.impl

public Class PropertiesBackedGenerator

extends JavaPropsGenerator
Class Inheritance
Imports
java.util.Map, .Properties, tools.jackson.core.*, tools.jackson.core.io.IOContext, tools.jackson.dataformat.javaprop.JavaPropsGenerator, .JavaPropsSchema

Field Summary

Modifier and TypeField and Description
protected final Map<String, Object>
_content

Underlying Properties that we will update with logical properties written out.

Inherited from tools.jackson.dataformat.javaprop.JavaPropsGenerator:
_basePath_headerChecked_indentLength_schema_streamWriteContextSHORT_WRITE

Constructor Summary

AccessConstructor and Description
public
PropertiesBackedGenerator(ObjectWriteContext writeCtxt, IOContext ctxt, int stdFeatures, JavaPropsSchema schema, Map<?, ?> content)

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
protected void
_releaseBuffers()

Implements abstract tools.jackson.core.base.GeneratorBase._releaseBuffers.

Method called to release any buffers generator may be holding, once generator is being closed.

protected void
protected void
protected void
protected void
protected void
protected void
_writeRaw(char[] text, int offset, int len)

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeRaw.

protected void
protected void
protected void
public void
close()

Overrides tools.jackson.core.base.GeneratorBase.close.

Implements java.io.Closeable.close.

Method called to close this generator, so that no more content can be written.

public void
flush()

Implements abstract tools.jackson.core.JsonGenerator.flush.

Implements java.io.Flushable.flush.

Method called to flush any buffered content to the underlying target (output stream, writer), and to flush the target itself as well.

public int
streamWriteOutputBuffered()

Implements abstract tools.jackson.core.JsonGenerator.streamWriteOutputBuffered.

Method for verifying amount of content that is buffered by generator but not yet flushed to the underlying target (stream, writer), in units (byte, char) that the generator implementation uses for buffering; or -1 if this information is not available.

public Object
streamWriteOutputTarget()

Implements abstract tools.jackson.core.JsonGenerator.streamWriteOutputTarget.

Method that can be used to get access to object that is used as target for generated output; this is usually either java.io.OutputStream or java.io.Writer, depending on what generator was constructed with.

Inherited from tools.jackson.dataformat.javaprop.JavaPropsGenerator:
_verifyValueWriteassignCurrentValuecanOmitPropertiescanWriteObjectIdcanWriteTypeIdcurrentValuegetPrettyPrintergetSchemastreamWriteCapabilitiesstreamWriteContextversionwriteBinarywriteBooleanwriteEndArraywriteEndObjectwriteNamewriteNullwriteNumberwriteNumberwriteNumberwriteNumberwriteNumberwriteNumberwriteNumberwriteNumberwritePropertyIdwriteRawwriteRawwriteRawwriteRawwriteRawwriteRawUTF8StringwriteStartArraywriteStartArraywriteStartObjectwriteStartObjectwriteStringwriteStringwriteUTF8String

Field Detail

_contentback to summary
protected final Map<String, Object> _content

Underlying Properties that we will update with logical properties written out.

Constructor Detail

PropertiesBackedGeneratorback to summary
public PropertiesBackedGenerator(ObjectWriteContext writeCtxt, IOContext ctxt, int stdFeatures, JavaPropsSchema schema, Map<?, ?> content)
Annotations
@SuppressWarnings:unchecked

Method Detail

_appendPropertyNameback to summary
protected void _appendPropertyName(StringBuilder path, String name)

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._appendPropertyName.

Annotations
@Override
_closeInputback to summary
protected void _closeInput()

Implements abstract tools.jackson.core.base.GeneratorBase._closeInput.

Annotations
@Override
_releaseBuffersback to summary
protected void _releaseBuffers()

Implements abstract tools.jackson.core.base.GeneratorBase._releaseBuffers.

Doc from tools.jackson.core.base.GeneratorBase._releaseBuffers.

Method called to release any buffers generator may be holding, once generator is being closed.

Annotations
@Override
_writeEscapedEntryback to summary
protected void _writeEscapedEntry(char[] text, int offset, int len) throws JacksonException

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeEscapedEntry.

Annotations
@Override
_writeEscapedEntryback to summary
protected void _writeEscapedEntry(String value) throws JacksonException

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeEscapedEntry.

Annotations
@Override
_writeRawback to summary
protected void _writeRaw(char c) throws JacksonException

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeRaw.

Annotations
@Override
_writeRawback to summary
protected void _writeRaw(String text) throws JacksonException

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeRaw.

Annotations
@Override
_writeRawback to summary
protected void _writeRaw(StringBuilder text) throws JacksonException

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeRaw.

Annotations
@Override
_writeRawback to summary
protected void _writeRaw(char[] text, int offset, int len) throws JacksonException

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeRaw.

Annotations
@Override
_writeRawLongback to summary
protected void _writeRawLong(String text) throws JacksonException
_writeRawLongback to summary
protected void _writeRawLong(StringBuilder text) throws JacksonException
_writeUnescapedEntryback to summary
protected void _writeUnescapedEntry(String value) throws JacksonException

Implements abstract tools.jackson.dataformat.javaprop.JavaPropsGenerator._writeUnescapedEntry.

Annotations
@Override
closeback to summary
public void close()

Overrides tools.jackson.core.base.GeneratorBase.close.

Implements java.io.Closeable.close.

Doc from tools.jackson.core.JsonGenerator.close.

Method called to close this generator, so that no more content can be written.

Whether the underlying target (stream, writer) gets closed depends on whether this generator either manages the target (i.e. is the only one with access to the target -- case if caller passes a reference to the resource such as File, but not stream); or has feature StreamWriteFeature#AUTO_CLOSE_TARGET enabled. If either of above is true, the target is also closed. Otherwise (not managing, feature not enabled), target is not closed.

Annotations
@Override
flushback to summary
public void flush()

Implements abstract tools.jackson.core.JsonGenerator.flush.

Implements java.io.Flushable.flush.

Doc from tools.jackson.core.JsonGenerator.flush.

Method called to flush any buffered content to the underlying target (output stream, writer), and to flush the target itself as well.

Annotations
@Override
streamWriteOutputBufferedback to summary
public int streamWriteOutputBuffered()

Implements abstract tools.jackson.core.JsonGenerator.streamWriteOutputBuffered.

Doc from tools.jackson.core.JsonGenerator.streamWriteOutputBuffered.

Method for verifying amount of content that is buffered by generator but not yet flushed to the underlying target (stream, writer), in units (byte, char) that the generator implementation uses for buffering; or -1 if this information is not available. Unit used is often the same as the unit of underlying target (that is, byte for java.io.OutputStream, char for java.io.Writer), but may differ if buffering is done before encoding. Default JSON-backed implementations do use matching units.

Note

was named getOutputBuffered() in Jackson 2.x.

Annotations
@Override
streamWriteOutputTargetback to summary
public Object streamWriteOutputTarget()

Implements abstract tools.jackson.core.JsonGenerator.streamWriteOutputTarget.

Doc from tools.jackson.core.JsonGenerator.streamWriteOutputTarget.

Method that can be used to get access to object that is used as target for generated output; this is usually either java.io.OutputStream or java.io.Writer, depending on what generator was constructed with. Note that returned value may be null in some cases; including case where implementation does not want to exposed raw source to caller. In cases where output has been decorated, object returned here is the decorated version; this allows some level of interaction between users of generator and decorator object.

In general use of this accessor should be considered as "last effort", i.e. only used if no other mechanism is applicable.

Note

was named getOutputTarget() in Jackson 2.x.

Annotations
@Override