public class _Private_IonTextWriterBuilder extends IonTextWriterBuilder
IonTextWriterBuilder.LstMinimizing, IonTextWriterBuilder.NewLineType
IonWriterBuilder.InitialIvmHandling, IonWriterBuilder.IvmMinimizing
Modifier and Type | Field and Description |
---|---|
boolean |
_allow_invalid_sids |
boolean |
_blob_as_string |
boolean |
_clob_as_string |
boolean |
_decimal_as_float |
boolean |
_float_nan_and_inf_as_null |
boolean |
_sexp_as_list |
boolean |
_skip_annotations |
boolean |
_string_as_json |
boolean |
_symbol_as_string |
boolean |
_timestamp_as_millis |
boolean |
_timestamp_as_string |
boolean |
_untyped_nulls |
static _Private_IonTextWriterBuilder |
STANDARD |
ASCII, UTF8
Modifier and Type | Method and Description |
---|---|
IonWriter |
build(java.lang.Appendable out)
Creates a new writer that will write text to the given output
stream.
|
IonWriter |
build(java.io.OutputStream out)
Builds a new writer based on this builder's configuration
properties.
|
_Private_IonTextWriterBuilder |
copy()
Creates a mutable copy of this builder.
|
_Private_CallbackBuilder |
getCallbackBuilder()
Gets the
_Private_CallbackBuilder that will be used to create a
_Private_MarkupCallback when a new writer is built. |
IonCatalog |
getCatalog()
Gets the catalog to use when building an
IonWriter . |
SymbolTable[] |
getImports()
Gets the imports that will be used to construct the initial local
symbol table.
|
_Private_IonTextWriterBuilder |
immutable()
Returns an immutable builder configured exactly like this one.
|
_Private_IonTextWriterBuilder |
mutable()
Returns a mutable builder configured exactly like this one.
|
protected void |
mutationCheck()
NOT FOR APPLICATION USE!
|
void |
setCallbackBuilder(_Private_CallbackBuilder builder)
Sets the
_Private_CallbackBuilder that will be used to create a
_Private_MarkupCallback when a new writer is built. |
void |
setCatalog(IonCatalog catalog)
Sets the catalog to use when building an
IonWriter . |
void |
setImports(SymbolTable... imports)
Sets the shared symbol tables that will be used to construct the
initial local symbol table.
|
static _Private_IonTextWriterBuilder |
standard() |
_Private_IonTextWriterBuilder |
withCallbackBuilder(_Private_CallbackBuilder builder)
Declares the
_Private_CallbackBuilder to use when building. |
_Private_IonTextWriterBuilder |
withInvalidSidsAllowed(boolean allowInvalidSids)
Determines whether this builder should allow invalid SIDs (i.e.
|
IonTextWriterBuilder |
withJsonDowngrade()
Declares that this builder should downgrade the writers' output to
JSON compatibility.
|
IonTextWriterBuilder |
withPrettyPrinting()
Declares that this builder should use basic pretty-printing.
|
getCharset, getInitialIvmHandling, getIvmMinimizing, getLongStringThreshold, getLstMinimizing, getNewLineType, getWriteTopLevelValuesOnNewLines, json, minimal, pretty, setCharset, setInitialIvmHandling, setIvmMinimizing, setLongStringThreshold, setLstMinimizing, setNewLineType, setWriteTopLevelValuesOnNewLines, withCatalog, withCharset, withCharsetAscii, withImports, withInitialIvmHandling, withIvmMinimizing, withLongStringThreshold, withLstMinimizing, withMinimalSystemData, withNewLineType, withWriteTopLevelValuesOnNewLines
public static _Private_IonTextWriterBuilder STANDARD
public boolean _blob_as_string
public boolean _clob_as_string
public boolean _decimal_as_float
public boolean _float_nan_and_inf_as_null
public boolean _sexp_as_list
public boolean _skip_annotations
public boolean _string_as_json
public boolean _symbol_as_string
public boolean _timestamp_as_millis
public boolean _timestamp_as_string
public boolean _untyped_nulls
public boolean _allow_invalid_sids
public static _Private_IonTextWriterBuilder standard()
public final _Private_IonTextWriterBuilder copy()
copy
in class IonTextWriterBuilder
this
.public _Private_IonTextWriterBuilder immutable()
immutable
in class IonTextWriterBuilder
public _Private_IonTextWriterBuilder mutable()
mutable
in class IonTextWriterBuilder
public final IonTextWriterBuilder withPrettyPrinting()
IonTextWriterBuilder
The specifics of this configuration may change between releases of this library, so automated processes should not depend on the exact output formatting.
withPrettyPrinting
in class IonTextWriterBuilder
public final IonTextWriterBuilder withJsonDowngrade()
IonTextWriterBuilder
The specific conversions are as follows:
IonTextWriterBuilder.withMinimalSystemData()
.
null
.
withJsonDowngrade
in class IonTextWriterBuilder
public final _Private_IonTextWriterBuilder withInvalidSidsAllowed(boolean allowInvalidSids)
allowInvalidSids
- whether to allow invalid SIDs.public final IonWriter build(java.lang.Appendable out)
IonTextWriterBuilder
If you have an OutputStream
, you'll get better performance using
IonWriterBuilder.build(OutputStream)
as opposed to wrapping your stream in an
Appendable
and calling this method.
build
in class IonTextWriterBuilder
out
- the stream that will receive Ion text data.
Must not be null.IonWriter
instance; not null
.public final IonWriter build(java.io.OutputStream out)
IonWriterBuilder
build
in class IonWriterBuilder
out
- the stream that will receive Ion data.
Must not be null.IonWriter
instance; not null
.public final _Private_CallbackBuilder getCallbackBuilder()
_Private_CallbackBuilder
that will be used to create a
_Private_MarkupCallback
when a new writer is built.setCallbackBuilder(_Private_CallbackBuilder)
,
withCallbackBuilder(_Private_CallbackBuilder)
public void setCallbackBuilder(_Private_CallbackBuilder builder)
_Private_CallbackBuilder
that will be used to create a
_Private_MarkupCallback
when a new writer is built.builder
- The builder that will be used to build a new MarkupCallback.java.lang.UnsupportedOperationException
- if this is immutable.getCallbackBuilder()
,
withCallbackBuilder(_Private_CallbackBuilder)
public final _Private_IonTextWriterBuilder withCallbackBuilder(_Private_CallbackBuilder builder)
_Private_CallbackBuilder
to use when building.builder
- The builder that will be used to build a new MarkupCallback.getCallbackBuilder()
,
setCallbackBuilder(_Private_CallbackBuilder)
protected void mutationCheck()
public final IonCatalog getCatalog()
IonWriter
.
The catalog is needed to resolve manually-written imports (not common).
By default, this property is null.setCatalog(IonCatalog)
,
withCatalog(IonCatalog)
public void setCatalog(IonCatalog catalog)
IonWriter
.catalog
- the catalog to use in built writers.
If null, the writer will be unable to resolve manually-written imports
and may throw an exception.java.lang.UnsupportedOperationException
- if this is immutable.getCatalog()
,
withCatalog(IonCatalog)
public final SymbolTable[] getImports()
setImports(SymbolTable...)
,
withImports(SymbolTable...)
public void setImports(SymbolTable... imports)
If the imports sequence is not null and not empty, the output stream
will be bootstrapped with a local symbol table that uses the given
imports
.
imports
- a sequence of shared symbol tables.
The first (and only the first) may be a system table.java.lang.UnsupportedOperationException
- if this is immutable.getImports()
,
withImports(SymbolTable...)