Top Description Inners Fields Constructors Methods
com.amazon.ion.impl

public Class _Private_IonTextWriterBuilder

extends IonTextWriterBuilder
Class Inheritance
Known Direct Subclasses
com.amazon.ion.impl._Private_IonTextWriterBuilder.Mutable
Static Imports
com.amazon.ion.impl._Private_Utils.initialSymtab

NOT FOR APPLICATION USE!

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public boolean
public boolean
private _Private_CallbackBuilder
public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
private static final CharSequence
public static _Private_IonTextWriterBuilder
Inherited from com.amazon.ion.system.IonTextWriterBuilder:
ASCIIUTF8

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
private IonWriter
build(_Private_FastAppendable appender)

Assumes that fillDefaults() has been called.

public final IonWriter
build(Appendable
the stream that will receive Ion text data. Must not be null.
out
)

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.build.

Creates a new writer that will write text to the given output stream.

public final IonWriter
build(OutputStream
the stream that will receive Ion data. Must not be null.
out
)

Implements abstract com.amazon.ion.system.IonWriterBuilder.build.

Builds a new writer based on this builder's configuration properties.

public final _Private_IonTextWriterBuilder
copy()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.copy.

Creates a mutable copy of this builder.

private _Private_IonTextWriterBuilder
public final _Private_CallbackBuilder

Returns:

The builder that will be used to build a new MarkupCallback.
getCallbackBuilder
()

Gets the _Private_CallbackBuilder that will be used to create a _Private_MarkupCallback when a new writer is built.

public _Private_IonTextWriterBuilder
immutable()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.immutable.

Returns an immutable builder configured exactly like this one.

pack-priv final boolean
pack-priv final CharSequence
public _Private_IonTextWriterBuilder
mutable()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.mutable.

Returns a mutable builder configured exactly like this one.

public void
setCallbackBuilder(_Private_CallbackBuilder
The builder that will be used to build a new MarkupCallback.
builder
)

Sets the _Private_CallbackBuilder that will be used to create a _Private_MarkupCallback when a new writer is built.

public static _Private_IonTextWriterBuilder
standard()

Hides com.amazon.ion.system.IonTextWriterBuilder.standard.

The standard builder of text IonWriters, with all configuration properties having their default values.

pack-priv final CharSequence
public final _Private_IonTextWriterBuilder

Returns:

this instance, if mutable; otherwise a mutable copy of this instance.
withCallbackBuilder
(_Private_CallbackBuilder
The builder that will be used to build a new MarkupCallback.
builder
)

Declares the _Private_CallbackBuilder to use when building.

public final _Private_IonTextWriterBuilder

Returns:

the builder.
withInvalidSidsAllowed
(boolean
whether to allow invalid SIDs.
allowInvalidSids
)

Determines whether this builder should allow invalid SIDs (i.e. SIDs out of range of the current symbol table or SIDs with unknown text).

public final IonTextWriterBuilder
withJsonDowngrade()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.withJsonDowngrade.

Declares that this builder should downgrade the writers' output to JSON compatibility.

public final IonTextWriterBuilder
withPrettyPrinting()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.withPrettyPrinting.

Declares that this builder should use basic pretty-printing.

Inherited from com.amazon.ion.system.IonTextWriterBuilder:
getCharsetgetInitialIvmHandlinggetIvmMinimizinggetLongStringThresholdgetLstMinimizinggetMaximumTimestampPrecisionDigitsgetNewLineTypegetWriteTopLevelValuesOnNewLinesjsonminimalprettysetCharsetsetInitialIvmHandlingsetIvmMinimizingsetLongStringThresholdsetLstMinimizingsetMaximumTimestampPrecisionDigitssetNewLineTypesetWriteTopLevelValuesOnNewLineswithCatalogwithCharsetwithCharsetAsciiwithImportswithInitialIvmHandlingwithIvmMinimizingwithLongStringThresholdwithLstMinimizingwithMaximumTimestampPrecisionDigitswithMinimalSystemDatawithNewLineTypewithWriteTopLevelValuesOnNewLines

Field Detail

_allow_invalid_sidsback to summary
public boolean _allow_invalid_sids
_blob_as_stringback to summary
public boolean _blob_as_string
_callback_builderback to summary
private _Private_CallbackBuilder _callback_builder
_clob_as_stringback to summary
public boolean _clob_as_string
_decimal_as_floatback to summary
public boolean _decimal_as_float
_float_nan_and_inf_as_nullback to summary
public boolean _float_nan_and_inf_as_null
_pretty_printback to summary
private boolean _pretty_print
_sexp_as_listback to summary
public boolean _sexp_as_list
_skip_annotationsback to summary
public boolean _skip_annotations
_string_as_jsonback to summary
public boolean _string_as_json
_symbol_as_stringback to summary
public boolean _symbol_as_string
_timestamp_as_millisback to summary
public boolean _timestamp_as_millis
_timestamp_as_stringback to summary
public boolean _timestamp_as_string
_untyped_nullsback to summary
public boolean _untyped_nulls
SPACE_CHARACTERback to summary
private static final CharSequence SPACE_CHARACTER
STANDARDback to summary
public static _Private_IonTextWriterBuilder STANDARD

Constructor Detail

_Private_IonTextWriterBuilderback to summary
private _Private_IonTextWriterBuilder()
_Private_IonTextWriterBuilderback to summary
private _Private_IonTextWriterBuilder(_Private_IonTextWriterBuilder that)

Method Detail

buildback to summary
private IonWriter build(_Private_FastAppendable appender)

Assumes that fillDefaults() has been called.

buildback to summary
public final IonWriter build(Appendable out)

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.build.

Doc from com.amazon.ion.system.IonTextWriterBuilder.build.

Creates a new writer that will write text to the given output stream.

If you have an OutputStream, you'll get better performance using build(OutputStream) as opposed to wrapping your stream in an Appendable and calling this method.

Parameters
out:Appendable

the stream that will receive Ion text data. Must not be null.

Returns:IonWriter

a new IonWriter instance; not null.

Annotations
@Override
buildback to summary
public final IonWriter build(OutputStream out)

Implements abstract com.amazon.ion.system.IonWriterBuilder.build.

Doc from com.amazon.ion.system.IonWriterBuilder.build.

Builds a new writer based on this builder's configuration properties.

Parameters
out:OutputStream

the stream that will receive Ion data. Must not be null.

Returns:IonWriter

a new IonWriter instance; not null.

Annotations
@Override
copyback to summary
public final _Private_IonTextWriterBuilder copy()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.copy.

Doc from com.amazon.ion.system.IonWriterBuilderBase.copy.

Creates a mutable copy of this builder.

Returns:_Private_IonTextWriterBuilder

a new builder with the same configuration as this.

Annotations
@Override
fillDefaultsback to summary
private _Private_IonTextWriterBuilder fillDefaults()
getCallbackBuilderback to summary
public final _Private_CallbackBuilder getCallbackBuilder()

Gets the _Private_CallbackBuilder that will be used to create a _Private_MarkupCallback when a new writer is built.

Returns:_Private_CallbackBuilder

The builder that will be used to build a new MarkupCallback.

See Also
setCallbackBuilder(_Private_CallbackBuilder), withCallbackBuilder(_Private_CallbackBuilder)
immutableback to summary
public _Private_IonTextWriterBuilder immutable()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.immutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.immutable.

Returns an immutable builder configured exactly like this one.

Returns:_Private_IonTextWriterBuilder

this instance, if immutable; otherwise an immutable copy of this instance.

Annotations
@Override
isPrettyPrintOnback to summary
pack-priv final boolean isPrettyPrintOn()
lineSeparatorback to summary
pack-priv final CharSequence lineSeparator()
mutableback to summary
public _Private_IonTextWriterBuilder mutable()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.mutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.mutable.

Returns a mutable builder configured exactly like this one.

Returns:_Private_IonTextWriterBuilder

this instance, if mutable; otherwise a mutable copy of this instance.

Annotations
@Override
setCallbackBuilderback to summary
public void setCallbackBuilder(_Private_CallbackBuilder builder)

Sets the _Private_CallbackBuilder that will be used to create a _Private_MarkupCallback when a new writer is built.

Parameters
builder:_Private_CallbackBuilder

The builder that will be used to build a new MarkupCallback.

Exceptions
UnsupportedOperationException:
if this is immutable.
See Also
getCallbackBuilder(), withCallbackBuilder(_Private_CallbackBuilder)
standardback to summary
public static _Private_IonTextWriterBuilder standard()

Hides com.amazon.ion.system.IonTextWriterBuilder.standard.

Doc from com.amazon.ion.system.IonTextWriterBuilder.standard.

The standard builder of text IonWriters, with all configuration properties having their default values. The resulting output is a direct representation of what's written to the writer, including version markers and local symbol tables.

Returns:_Private_IonTextWriterBuilder

a new, mutable builder instance.

topLevelSeparatorback to summary
pack-priv final CharSequence topLevelSeparator()
withCallbackBuilderback to summary
public final _Private_IonTextWriterBuilder withCallbackBuilder(_Private_CallbackBuilder builder)

Declares the _Private_CallbackBuilder to use when building.

Parameters
builder:_Private_CallbackBuilder

The builder that will be used to build a new MarkupCallback.

Returns:_Private_IonTextWriterBuilder

this instance, if mutable; otherwise a mutable copy of this instance.

See Also
getCallbackBuilder(), setCallbackBuilder(_Private_CallbackBuilder)
withInvalidSidsAllowedback to summary
public final _Private_IonTextWriterBuilder withInvalidSidsAllowed(boolean allowInvalidSids)

Determines whether this builder should allow invalid SIDs (i.e. SIDs out of range of the current symbol table or SIDs with unknown text). This is disabled by default, because enabling this option can result in writing invalid Ion data. This option should only be enabled when writing text Ion data primarily for debugging by humans.

Parameters
allowInvalidSids:boolean

whether to allow invalid SIDs.

Returns:_Private_IonTextWriterBuilder

the builder.

withJsonDowngradeback to summary
public final IonTextWriterBuilder withJsonDowngrade()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.withJsonDowngrade.

Doc from com.amazon.ion.system.IonTextWriterBuilder.withJsonDowngrade.

Declares that this builder should downgrade the writers' output to JSON compatibility. This format cannot round-trip back to Ion with full fidelity.

The specific conversions are as follows:

  • System data is suppressed per withMinimalSystemData().
  • All annotations are suppressed.
  • Nulls of any type are printed as JSON null.
  • Blobs are printed as strings, containing Base64.
  • Clobs are printed as strings, containing only Unicode code points U+00 through U+FF.
  • Sexps are printed as lists.
  • Symbols are printed as strings.
  • Timestamps are printed as strings, using Ion timestamp format.
Returns:IonTextWriterBuilder

this instance, if mutable; otherwise a mutable copy of this instance.

Annotations
@Override
withPrettyPrintingback to summary
public final IonTextWriterBuilder withPrettyPrinting()

Implements abstract com.amazon.ion.system.IonTextWriterBuilder.withPrettyPrinting.

Doc from com.amazon.ion.system.IonTextWriterBuilder.withPrettyPrinting.

Declares that this builder should use basic pretty-printing. Does not alter the handling of system data. Calling this method alters several other configuration properties, so code should call it first, then make any necessary overrides.

The specifics of this configuration may change between releases of this library, so automated processes should not depend on the exact output formatting.

Returns:IonTextWriterBuilder

this instance, if mutable; otherwise a mutable copy of this instance.

Annotations
@Override
com.amazon.ion.impl back to summary

private final Class _Private_IonTextWriterBuilder.Mutable

extends _Private_IonTextWriterBuilder
Class Inheritance

Field Summary

Inherited from com.amazon.ion.impl._Private_IonTextWriterBuilder:
_allow_invalid_sids_blob_as_string_clob_as_string_decimal_as_float_float_nan_and_inf_as_null_sexp_as_list_skip_annotations_string_as_json_symbol_as_string_timestamp_as_millis_timestamp_as_string_untyped_nullsSTANDARD

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
public _Private_IonTextWriterBuilder
immutable()

Overrides com.amazon.ion.impl._Private_IonTextWriterBuilder.immutable.

Returns an immutable builder configured exactly like this one.

public _Private_IonTextWriterBuilder
mutable()

Overrides com.amazon.ion.impl._Private_IonTextWriterBuilder.mutable.

Returns a mutable builder configured exactly like this one.

protected void
Inherited from com.amazon.ion.impl._Private_IonTextWriterBuilder:
buildbuildcopygetCallbackBuilderisPrettyPrintOnlineSeparatorsetCallbackBuilderstandardtopLevelSeparatorwithCallbackBuilderwithInvalidSidsAllowedwithJsonDowngradewithPrettyPrinting

Constructor Detail

Mutableback to summary
private Mutable()
Mutableback to summary
private Mutable(_Private_IonTextWriterBuilder that)

Method Detail

immutableback to summary
public _Private_IonTextWriterBuilder immutable()

Overrides com.amazon.ion.impl._Private_IonTextWriterBuilder.immutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.immutable.

Returns an immutable builder configured exactly like this one.

Returns:_Private_IonTextWriterBuilder

this instance, if immutable; otherwise an immutable copy of this instance.

Annotations
@Override
mutableback to summary
public _Private_IonTextWriterBuilder mutable()

Overrides com.amazon.ion.impl._Private_IonTextWriterBuilder.mutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.mutable.

Returns a mutable builder configured exactly like this one.

Returns:_Private_IonTextWriterBuilder

this instance, if mutable; otherwise a mutable copy of this instance.

Annotations
@Override
mutationCheckback to summary
protected void mutationCheck()

Overrides com.amazon.ion.system.IonWriterBuilderBase.mutationCheck.

Doc from com.amazon.ion.system.IonWriterBuilderBase.mutationCheck.

NOT FOR APPLICATION USE!

Annotations
@Override