Top Fields Constructors Methods
com.amazon.ion.impl

pack-priv Class IonWriterSystemTextMarkup

extends IonWriterSystemText
Class Inheritance
Imports
com.amazon.ion.IonType, .SymbolTable, .SymbolToken, .Timestamp, com.amazon.ion.util._Private_FastAppendable, java.io.IOException, java.math.BigDecimal, .BigInteger

Field Summary

Modifier and TypeField and Description
private final _Private_MarkupCallback
private IonType
myTypeBeingWritten

myTypeBeingWritten is used to communicate the type of the data that was requested to be written via a write<type> to the subsequent methods that need to know the type for calling callbacks.

Inherited from com.amazon.ion.impl.IonWriterSystemText:
_in_struct_pending_separator_separator_character_stack_parent_type_stack_pending_comma_top

Constructor Summary

AccessConstructor and Description
public
private
private

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
public void
stepIn(IonType containerType)

Overrides com.amazon.ion.impl.IonWriterSystemText.stepIn.

Implements com.amazon.ion.IonWriter.stepIn.

Writes the beginning of a non-null container (list, sexp, or struct).

public void
stepOut()

Overrides com.amazon.ion.impl.IonWriterSystemText.stepOut.

Implements com.amazon.ion.IonWriter.stepOut.

Writes the end of the current container, returning this writer to the context of parent container.

protected void
protected void
public void
writeBlob(byte[]
bytes to be written. May be null to represent null.blob.
value
,
int
offset of the first byte in value to write
start
,
int
number of bytes to write from value
len
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeBlob.

Implements com.amazon.ion.IonWriter.writeBlob.

Writes a portion of the byte array out as an IonBlob value.

public void
writeBool(boolean
true or false as desired
value
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeBool.

Implements com.amazon.ion.IonWriter.writeBool.

writes a non-null boolean value (true or false) as an IonBool to output.

public void
writeClob(byte[]
bytes to be written. May be null to represent null.clob.
value
,
int
offset of the first byte in value to write
start
,
int
number of bytes to write from value
len
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeClob.

Implements com.amazon.ion.IonWriter.writeClob.

Writes a portion of the byte array out as an IonClob value.

public void
writeDecimal(BigDecimal
may be null to represent null.decimal.
value
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeDecimal.

Implements com.amazon.ion.IonWriter.writeDecimal.

Writes a BigDecimal value as an Ion decimal.

protected void
public void
writeFloat(double
double to write
value
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeFloat.

Implements com.amazon.ion.IonWriter.writeFloat.

writes a 64 bit binary floating point value, a Java double, as an IonFloat.

public void
writeInt(long
signed int to write
value
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeInt.

Implements com.amazon.ion.IonWriter.writeInt.

writes a signed 64 bit value, a Java long, as an IonInt.

public void
writeInt(BigInteger
BigInteger to write
value
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeInt.

Implements com.amazon.ion.IonWriter.writeInt.

writes a BigInteger value as an IonInt.

public void
writeNull()

Overrides com.amazon.ion.impl.IonWriterSystemText.writeNull.

Implements com.amazon.ion.IonWriter.writeNull.

Writes a value of Ion's null type (null aka null.null).

public void
writeNull(IonType
type of the null to be written
type
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeNull.

Implements com.amazon.ion.IonWriter.writeNull.

Writes a null value of a specified Ion type.

protected boolean
public void
writeString(String
may be null to represent null.string.
value
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeString.

Implements com.amazon.ion.IonWriter.writeString.

Writes a java.lang.String as an Ion string.

public void
writeSymbolAsIs(String value)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeSymbolAsIs.

Writes a symbol without checking for system ID.

public void
writeSymbolAsIs(int value)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeSymbolAsIs.

Writes a symbol without checking for system ID.

public void
writeTimestamp(Timestamp
may be null to represent null.timestamp.
value
)

Overrides com.amazon.ion.impl.IonWriterSystemText.writeTimestamp.

Implements com.amazon.ion.IonWriter.writeTimestamp.

Writes a timestamp value.

Inherited from com.amazon.ion.impl.IonWriterSystemText:
closecloseCollectionflushgetBuildergetContainergetDepthgrowStackisInStructpopprintLeadingWhiteSpacepushtopPendingCommatopTypewriteIonVersionMarkerAsIswriteLocalSymtab

Field Detail

myCallbackback to summary
private final _Private_MarkupCallback myCallback
myTypeBeingWrittenback to summary
private IonType myTypeBeingWritten

myTypeBeingWritten is used to communicate the type of the data that was requested to be written via a write to the subsequent methods that need to know the type for calling callbacks. It is not used when writing containers, or separators, since the type of container is passed in by the user, or can be obtained via getContainer().

Constructor Detail

IonWriterSystemTextMarkupback to summary
public IonWriterSystemTextMarkup(SymbolTable defaultSystemSymtab, _Private_IonTextWriterBuilder options, _Private_FastAppendable out)
IonWriterSystemTextMarkupback to summary
private IonWriterSystemTextMarkup(SymbolTable defaultSystemSymtab, _Private_IonTextWriterBuilder options, _Private_FastAppendable out, _Private_CallbackBuilder builder)
IonWriterSystemTextMarkupback to summary
private IonWriterSystemTextMarkup(SymbolTable defaultSystemSymtab, _Private_IonTextWriterBuilder options, _Private_MarkupCallback callback)

Method Detail

closeValueback to summary
pack-priv void closeValue() throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.closeValue.

Annotations
@Override
startValueback to summary
pack-priv void startValue() throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.startValue.

Annotations
@Override
stepInback to summary
public void stepIn(IonType containerType) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.stepIn.

Implements com.amazon.ion.IonWriter.stepIn.

Doc from com.amazon.ion.IonWriter.stepIn.

Writes the beginning of a non-null container (list, sexp, or struct). This must be matched by a call to stepOut() after the last child value.

This method is not used to write null.list et al. To write null values use writeNull(IonType).

Parameters
containerType:IonType

must be one of IonType#LIST, IonType#SEXP, or IonType#STRUCT.

Annotations
@Override
stepOutback to summary
public void stepOut() throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.stepOut.

Implements com.amazon.ion.IonWriter.stepOut.

Doc from com.amazon.ion.IonWriter.stepOut.

Writes the end of the current container, returning this writer to the context of parent container. Invocation of this method must match a preceding call to stepIn(IonType).

Annotations
@Override
writeAnnotationsback to summary
protected void writeAnnotations(SymbolToken[] annotations) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeAnnotations.

Annotations
@Override
writeAnnotationTokenback to summary
protected void writeAnnotationToken(SymbolToken sym) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeAnnotationToken.

Annotations
@Override
writeBlobback to summary
public void writeBlob(byte[] value, int start, int len) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeBlob.

Implements com.amazon.ion.IonWriter.writeBlob.

Doc from com.amazon.ion.IonWriter.writeBlob.

Writes a portion of the byte array out as an IonBlob value. This copies the portion of the byte array that is written.

Parameters
value:byte[]

bytes to be written. May be null to represent null.blob.

start:int

offset of the first byte in value to write

len:int

number of bytes to write from value

Annotations
@Override
writeBoolback to summary
public void writeBool(boolean value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeBool.

Implements com.amazon.ion.IonWriter.writeBool.

Doc from com.amazon.ion.IonWriter.writeBool.

writes a non-null boolean value (true or false) as an IonBool to output.

Parameters
value:boolean

true or false as desired

Annotations
@Override
writeClobback to summary
public void writeClob(byte[] value, int start, int len) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeClob.

Implements com.amazon.ion.IonWriter.writeClob.

Doc from com.amazon.ion.IonWriter.writeClob.

Writes a portion of the byte array out as an IonClob value. This copies the porition of the byte array that is written.

Parameters
value:byte[]

bytes to be written. May be null to represent null.clob.

start:int

offset of the first byte in value to write

len:int

number of bytes to write from value

Annotations
@Override
writeDecimalback to summary
public void writeDecimal(BigDecimal value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeDecimal.

Implements com.amazon.ion.IonWriter.writeDecimal.

Doc from com.amazon.ion.IonWriter.writeDecimal.

Writes a BigDecimal value as an Ion decimal. Ion uses an arbitrarily long sign/value and an arbitrarily long signed exponent to write the value. This preserves all of the BigDecimal digits, the number of significant digits.

To write a negative zero value, pass this method a Decimal instance.

Parameters
value:BigDecimal

may be null to represent null.decimal.

Annotations
@Override
writeFieldNameTokenback to summary
protected void writeFieldNameToken(SymbolToken sym) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeFieldNameToken.

Annotations
@Override
writeFloatback to summary
public void writeFloat(double value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeFloat.

Implements com.amazon.ion.IonWriter.writeFloat.

Doc from com.amazon.ion.IonWriter.writeFloat.

writes a 64 bit binary floating point value, a Java double, as an IonFloat. Currently IonFloat values are output as 64 bit IEEE 754 big endian values. IonFloat preserves all valid floating point values, including -0.0, Nan and +/-infinity. It does not guarantee preservation of -Nan or other less less "common" values.

Parameters
value:double

double to write

Annotations
@Override
writeIntback to summary
public void writeInt(long value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeInt.

Implements com.amazon.ion.IonWriter.writeInt.

Doc from com.amazon.ion.IonWriter.writeInt.

writes a signed 64 bit value, a Java long, as an IonInt.

Parameters
value:long

signed int to write

Annotations
@Override
writeIntback to summary
public void writeInt(BigInteger value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeInt.

Implements com.amazon.ion.IonWriter.writeInt.

Doc from com.amazon.ion.IonWriter.writeInt.

writes a BigInteger value as an IonInt. If the BigInteger value is null this writes a null int.

Parameters
value:BigInteger

BigInteger to write

Annotations
@Override
writeNullback to summary
public void writeNull() throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeNull.

Implements com.amazon.ion.IonWriter.writeNull.

Doc from com.amazon.ion.IonWriter.writeNull.

Writes a value of Ion's null type (null aka null.null).

Annotations
@Override
writeNullback to summary
public void writeNull(IonType type) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeNull.

Implements com.amazon.ion.IonWriter.writeNull.

Doc from com.amazon.ion.IonWriter.writeNull.

Writes a null value of a specified Ion type.

Parameters
type:IonType

type of the null to be written

Annotations
@Override
writeSeparatorback to summary
protected boolean writeSeparator(boolean followingLongString) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeSeparator.

Annotations
@Override
writeStringback to summary
public void writeString(String value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeString.

Implements com.amazon.ion.IonWriter.writeString.

Doc from com.amazon.ion.IonWriter.writeString.

Writes a java.lang.String as an Ion string. Since Ion strings are UTF-8 and Java Strings are Unicode 16. As such the resulting lengths may not match. In addition some Java strings are not valid as they may contain only one of the two needed surrogate code units necessary to define the Unicode code point to be output, an exception will be raised if this case is encountered.

Parameters
value:String

may be null to represent null.string.

Annotations
@Override
writeSymbolAsIsback to summary
public void writeSymbolAsIs(String value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeSymbolAsIs.

Doc from com.amazon.ion.impl.IonWriterSystem.writeSymbolAsIs.

Writes a symbol without checking for system ID.

Annotations
@Override
writeSymbolAsIsback to summary
public void writeSymbolAsIs(int value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeSymbolAsIs.

Doc from com.amazon.ion.impl.IonWriterSystem.writeSymbolAsIs.

Writes a symbol without checking for system ID.

Annotations
@Override
writeTimestampback to summary
public void writeTimestamp(Timestamp value) throws IOException

Overrides com.amazon.ion.impl.IonWriterSystemText.writeTimestamp.

Implements com.amazon.ion.IonWriter.writeTimestamp.

Doc from com.amazon.ion.IonWriter.writeTimestamp.

Writes a timestamp value.

Parameters
value:Timestamp

may be null to represent null.timestamp.

Annotations
@Override