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

pack-priv final Class IonBinaryWriterAdapter

extends Object
implements IonBinaryWriter
Class Inheritance
All Implemented Interfaces
com.amazon.ion.IonBinaryWriter, com.amazon.ion.IonWriter, com.amazon.ion.facet.Faceted, java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable
Annotations
@Deprecated
Imports
com.amazon.ion.IonBinaryWriter, .IonReader, .IonType, .IonValue, .IonWriter, .SymbolTable, .SymbolToken, .Timestamp, java.io.ByteArrayOutputStream, .IOException, .OutputStream, java.math.BigDecimal, .BigInteger, java.util.Date

Deprecated

Adapts arbitrary IonWriter implementations to an IonBinaryWriter instances.

This class is provided as a shim for compatibility to allow binary writer implementations to be adaptable to the legacy interface.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
IonBinaryWriterAdapter.Factory

Simple interface for constructing an IonWriter from an output stream.

private static class
IonBinaryWriterAdapter.InternalByteArrayOutputStream

Internal ByteArrayOutputStream implementation to get access to the buffer.

Field Summary

Modifier and TypeField and Description
private final IonBinaryWriterAdapter.InternalByteArrayOutputStream
private final IonWriter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addTypeAnnotation(String
string annotation to append to the annotation list
annotation
)

Implements com.amazon.ion.IonWriter.addTypeAnnotation.

Adds a given string to the list of pending annotations.

public <T> T
asFacet(Class<T>
The type token of the requested facet type.
facetType
)

Implements com.amazon.ion.facet.Faceted.asFacet.

Returns a facet of this subject if supported.

public int
byteSize()

Implements com.amazon.ion.IonBinaryWriter.byteSize.

Gets the size in bytes of this binary data.

public void
close()

Implements com.amazon.ion.IonWriter.close.

Closes this stream and releases any system resources associated with it.

public void
finish()

Implements com.amazon.ion.IonWriter.finish.

Indicates that writing is completed and all buffered data should be written and flushed as if this were the end of the Ion data stream.

public void
flush()

Implements com.amazon.ion.IonWriter.flush.

Flushes this writer by writing any buffered output to the underlying output target without finalizing the stream's local symbol table.

public byte[]
getBytes()

Implements com.amazon.ion.IonBinaryWriter.getBytes.

Copies the current contents of this writer as a new byte array holding Ion binary-encoded data.

public int
getBytes(byte[]
users byte array to write into
bytes
,
int
initial offset in the array to write into
offset
,
int
maximum number of bytes to write
maxlen
)

Implements com.amazon.ion.IonBinaryWriter.getBytes.

Copies the current contents of the writer to a given byte array array.

pack-priv IonWriter
public SymbolTable
getSymbolTable()

Implements com.amazon.ion.IonWriter.getSymbolTable.

Gets the symbol table that is currently in use by the writer.

public boolean
isInStruct()

Implements com.amazon.ion.IonWriter.isInStruct.

Determines whether values are being written as fields of a struct.

pack-priv void
public void
setFieldName(String
text of the field name
name
)

Implements com.amazon.ion.IonWriter.setFieldName.

Sets the pending field name to the given text.

public void
setFieldNameSymbol(SymbolToken
text of the field name
name
)

Implements com.amazon.ion.IonWriter.setFieldNameSymbol.

Sets the pending field name to the given token.

public void
setTypeAnnotations(String...
string array with the annotations. If null or empty, any pending annotations are cleared.
annotations
)

Implements com.amazon.ion.IonWriter.setTypeAnnotations.

Sets the full list of pending annotations to the given text symbols.

public void
setTypeAnnotationSymbols(SymbolToken...
If null or empty, any pending annotations are cleared.
annotations
)

Implements com.amazon.ion.IonWriter.setTypeAnnotationSymbols.

Sets the full list of pending annotations to the given symbols.

public void
stepIn(IonType containerType)

Implements com.amazon.ion.IonWriter.stepIn.

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

public void
stepOut()

Implements com.amazon.ion.IonWriter.stepOut.

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

public void
writeBlob(byte[]
may be null to represent null.blob.
value
)

Implements com.amazon.ion.IonWriter.writeBlob.

write the byte array out as an IonBlob value.

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
)

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
)

Implements com.amazon.ion.IonWriter.writeBool.

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

public int
writeBytes(OutputStream
OutputStream to write the bytes to
userstream
)

Implements com.amazon.ion.IonBinaryWriter.writeBytes.

Writes the current contents of the writer to the output stream.

public void
writeClob(byte[]
may be null to represent null.clob.
value
)

Implements com.amazon.ion.IonWriter.writeClob.

write the byte array out as an IonClob value.

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
)

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
)

Implements com.amazon.ion.IonWriter.writeDecimal.

Writes a BigDecimal value as an Ion decimal.

public void
writeFloat(double
double to write
value
)

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
)

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
)

Implements com.amazon.ion.IonWriter.writeInt.

writes a BigInteger value as an IonInt.

public void
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
)

Implements com.amazon.ion.IonWriter.writeNull.

Writes a null value of a specified Ion type.

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

Implements com.amazon.ion.IonWriter.writeString.

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

public void
writeSymbol(String
may be null to represent null.symbol.
content
)

Implements com.amazon.ion.IonWriter.writeSymbol.

Writes the text of an Ion symbol value.

public void
writeSymbolToken(SymbolToken
may be null to represent null.symbol.
content
)

Implements com.amazon.ion.IonWriter.writeSymbolToken.

Writes the content of an Ion symbol value.

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

Implements com.amazon.ion.IonWriter.writeTimestamp.

Writes a timestamp value.

public void
writeTimestampUTC(Date
java.util Date holding the UTC timestamp; may be null to represent null.timestamp.
value
)

Implements com.amazon.ion.IonWriter.writeTimestampUTC.

writes the passed in Date (in milliseconds since the epoch) as an IonTimestamp.

public void
writeValue(IonValue
may be null, in which case this method does nothing.
value
)

Implements com.amazon.ion.IonWriter.writeValue.

writes the contents of the passed in Ion value to the output.

public void
writeValue(IonReader reader)

Implements com.amazon.ion.IonWriter.writeValue.

Writes the current value from a reader.

public void
writeValues(IonReader reader)

Implements com.amazon.ion.IonWriter.writeValues.

Writes a reader's current value, and all following values until the end of the current container.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private final IonBinaryWriterAdapter.InternalByteArrayOutputStream buffer
delegateback to summary
private final IonWriter delegate

Constructor Detail

IonBinaryWriterAdapterback to summary
public IonBinaryWriterAdapter(final IonBinaryWriterAdapter.Factory factory) throws IOException

Method Detail

addTypeAnnotationback to summary
public void addTypeAnnotation(String annotation)

Implements com.amazon.ion.IonWriter.addTypeAnnotation.

Doc from com.amazon.ion.IonWriter.addTypeAnnotation.

Adds a given string to the list of pending annotations.

The list of pending annotations is cleared when the current value is written via stepIn() or one of the write*() methods.

Parameters
annotation:String

string annotation to append to the annotation list

asFacetback to summary
public <T> T asFacet(Class<T> facetType)

Implements com.amazon.ion.facet.Faceted.asFacet.

Doc from com.amazon.ion.facet.Faceted.asFacet.

Returns a facet of this subject if supported.

Parameters
<T>
The requested facet type.
facetType:Class<T>

The type token of the requested facet type.

Returns:T

An instance of T representing the facet of the subject, or null if the facet is not supported by the subject.

byteSizeback to summary
public int byteSize()

Implements com.amazon.ion.IonBinaryWriter.byteSize.

Doc from com.amazon.ion.IonBinaryWriter.byteSize.

Gets the size in bytes of this binary data. This is generally needed before calling getBytes() or getBytes(byte[], int, int).

Returns:int

the size in bytes.

closeback to summary
public void close() throws IOException

Implements com.amazon.ion.IonWriter.close.

Doc from com.amazon.ion.IonWriter.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

If the cursor is between top-level values, this method will finish() before closing the underlying output stream. If not, the resulting data may be incomplete and invalid Ion.

In other words: unless you're recovering from a failure condition, don't close the writer until you've stepped-out back to the starting level.

Exceptions
IOException:
if thrown by the underlying output target.
finishback to summary
public void finish() throws IOException

Implements com.amazon.ion.IonWriter.finish.

Doc from com.amazon.ion.IonWriter.finish.

Indicates that writing is completed and all buffered data should be written and flushed as if this were the end of the Ion data stream. For example, an Ion binary writer will finalize any local symbol table, write all top-level values, and then flush.

This method may only be called when all top-level values are completely written and stepped-out.

Implementations should allow the application to continue writing further top-level values following the semantics for concatenating Ion data streams. If another top-level value is written, the result must behave as if it were preceded by an Ion version marker, resetting the stream context as if this were a new stream. (Whether or not an IVM is written may depend upon the writer's configuration; see IvmMinimizing.)

This feature can be used to flush buffered data and reset the local symbol table before writing more values. Applications that produce long streams of binary Ion may wish to finish occasionally to relieve memory pressure, then continue writing data using a new local symbol table. This is particularly useful for streams that contain an ever-growing number of unique symbols to avoid unbounded growth of the symbol table, which may degrade performance and bloat the encoding. Applications that produce long streams with a limited number of unique symbols should enable localSymbolTableAppend (see com.amazon.ion.system.IonBinaryWriterBuilder#withLocalSymbolTableAppendEnabled) and flush() instead to avoid re-declaring the local symbol table unnecessarily.

Exceptions
IOException:
if thrown by the underlying output target.
flushback to summary
public void flush() throws IOException

Implements com.amazon.ion.IonWriter.flush.

Doc from com.amazon.ion.IonWriter.flush.

Flushes this writer by writing any buffered output to the underlying output target without finalizing the stream's local symbol table.

For some implementations this may have no effect even when some data is buffered, because it's not always possible to fully write partial data. In particular, when writing binary Ion data, Ion's length-prefixed encoding requires a complete top-level value to be written at once.

If localSymbolTableAppend is enabled (see com.amazon.ion.system.IonBinaryWriterBuilder#withLocalSymbolTableAppendEnabled), this feature can be used to flush buffered data before writing more values without subsequently having to redeclare the current local symbol table. Applications that produce long streams of binary Ion may wish to flush occasionally to relieve memory pressure, then continue writing data using the same local symbol table. The symbol table will be appended with newly-encountered symbols as necessary.

Exceptions
IOException:
if thrown by the underlying output target.
getBytesback to summary
public byte[] getBytes() throws IOException

Implements com.amazon.ion.IonBinaryWriter.getBytes.

Doc from com.amazon.ion.IonBinaryWriter.getBytes.

Copies the current contents of this writer as a new byte array holding Ion binary-encoded data. This allocates an array of the size needed to exactly hold the output and copies the entire value to it.

Returns:byte[]

the byte array with the writers output

getBytesback to summary
public int getBytes(byte[] bytes, int offset, int maxlen) throws IOException

Implements com.amazon.ion.IonBinaryWriter.getBytes.

Doc from com.amazon.ion.IonBinaryWriter.getBytes.

Copies the current contents of the writer to a given byte array array. This starts writing to the array at offset and writes up to maxlen bytes. If this writer is not able to stop in the middle of its work this may overwrite the array and later throw and exception.

Parameters
bytes:byte[]

users byte array to write into

offset:int

initial offset in the array to write into

maxlen:int

maximum number of bytes to write

Returns:int

number of bytes written

getDelegateback to summary
pack-priv IonWriter getDelegate()
getSymbolTableback to summary
public SymbolTable getSymbolTable()

Implements com.amazon.ion.IonWriter.getSymbolTable.

Doc from com.amazon.ion.IonWriter.getSymbolTable.

Gets the symbol table that is currently in use by the writer. While writing a number of values the symbol table will be populated with any added symbols.

Note that the table may be replaced during processing. For example, the stream may start out with a system table that's later replaced by a local table in order to store newly-encountered symbols.

When this method returns a local table, it may be mutable, meaning that additional symbols may be interned until it is made read-only. Note that manually mutating local symbol tables is a deprecated feature; please instead use IonSystem#newBinaryWriter(java.io.OutputStream, SymbolTable...) or IonSystem#newTextWriter(java.io.OutputStream, SymbolTable...) to provide custom symbol table(s) to writers upon construction.

Returns:SymbolTable

current symbol table

isInStructback to summary
public boolean isInStruct()

Implements com.amazon.ion.IonWriter.isInStruct.

Doc from com.amazon.ion.IonWriter.isInStruct.

Determines whether values are being written as fields of a struct. This is especially useful when it is not clear whether field names need to be written or not.

Returns:boolean

true when the parent is a struct.

resetback to summary
pack-priv void reset()
setFieldNameback to summary
public void setFieldName(String name)

Implements com.amazon.ion.IonWriter.setFieldName.

Doc from com.amazon.ion.IonWriter.setFieldName.

Sets the pending field name to the given text.

The pending field name is cleared when the current value is written via stepIn() or one of the write*() methods.

Parameters
name:String

text of the field name

setFieldNameSymbolback to summary
public void setFieldNameSymbol(SymbolToken name)

Implements com.amazon.ion.IonWriter.setFieldNameSymbol.

Doc from com.amazon.ion.IonWriter.setFieldNameSymbol.

Sets the pending field name to the given token.

The pending field name is cleared when the current value is written via stepIn() or one of the write*() methods.

Parameters
name:SymbolToken

text of the field name

setTypeAnnotationsback to summary
public void setTypeAnnotations(String... annotations)

Implements com.amazon.ion.IonWriter.setTypeAnnotations.

Doc from com.amazon.ion.IonWriter.setTypeAnnotations.

Sets the full list of pending annotations to the given text symbols. Any pending annotations are cleared. The contents of the annotations array are copied into this writer, so the caller does not need to preserve the array.

The list of pending annotations is cleared when the current value is written via stepIn() or one of the write*() methods.

Parameters
annotations:String[]

string array with the annotations. If null or empty, any pending annotations are cleared.

setTypeAnnotationSymbolsback to summary
public void setTypeAnnotationSymbols(SymbolToken... annotations)

Implements com.amazon.ion.IonWriter.setTypeAnnotationSymbols.

Doc from com.amazon.ion.IonWriter.setTypeAnnotationSymbols.

Sets the full list of pending annotations to the given symbols. Any pending annotations are cleared. The contents of the annotations array are copied into this writer, so the caller does not need to preserve the array.

The list of pending annotations is cleared when the current value is written via stepIn() or one of the write*() methods.

This is an "expert method": correct use requires deep understanding of the Ion binary format. You almost certainly don't want to use it.

Parameters
annotations:SymbolToken[]

If null or empty, any pending annotations are cleared.

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

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.

stepOutback to summary
public void stepOut() throws IOException

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).

writeBlobback to summary
public void writeBlob(byte[] value) throws IOException

Implements com.amazon.ion.IonWriter.writeBlob.

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

write the byte array out as an IonBlob value. This copies the byte array.

Parameters
value:byte[]

may be null to represent null.blob.

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

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

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

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

writeBytesback to summary
public int writeBytes(OutputStream userstream) throws IOException

Implements com.amazon.ion.IonBinaryWriter.writeBytes.

Doc from com.amazon.ion.IonBinaryWriter.writeBytes.

Writes the current contents of the writer to the output stream. This is only valid if the writer is not in the middle of writing a container.

Parameters
userstream:OutputStream

OutputStream to write the bytes to

Returns:int

int length of bytes written

writeClobback to summary
public void writeClob(byte[] value) throws IOException

Implements com.amazon.ion.IonWriter.writeClob.

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

write the byte array out as an IonClob value. This copies the byte array.

Parameters
value:byte[]

may be null to represent null.clob.

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

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

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

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.

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

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

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

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

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

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

writeNullback to summary
public void writeNull() throws IOException

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).

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

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

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

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.

writeSymbolback to summary
public void writeSymbol(String content) throws IOException

Implements com.amazon.ion.IonWriter.writeSymbol.

Doc from com.amazon.ion.IonWriter.writeSymbol.

Writes the text of an Ion symbol value.

Parameters
content:String

may be null to represent null.symbol.

writeSymbolTokenback to summary
public void writeSymbolToken(SymbolToken content) throws IOException

Implements com.amazon.ion.IonWriter.writeSymbolToken.

Doc from com.amazon.ion.IonWriter.writeSymbolToken.

Writes the content of an Ion symbol value.

Parameters
content:SymbolToken

may be null to represent null.symbol.

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

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.

writeTimestampUTCback to summary
public void writeTimestampUTC(Date value) throws IOException

Implements com.amazon.ion.IonWriter.writeTimestampUTC.

Doc from com.amazon.ion.IonWriter.writeTimestampUTC.

writes the passed in Date (in milliseconds since the epoch) as an IonTimestamp. The Date value is treated as a UTC value with an unknown timezone offset (a z value).

Parameters
value:Date

java.util Date holding the UTC timestamp; may be null to represent null.timestamp.

writeValueback to summary
public void writeValue(IonValue value) throws IOException

Implements com.amazon.ion.IonWriter.writeValue.

Doc from com.amazon.ion.IonWriter.writeValue.

writes the contents of the passed in Ion value to the output.

This method also writes annotations and field names (if in a struct), and performs a deep write, including the contents of any containers encountered.

Parameters
value:IonValue

may be null, in which case this method does nothing.

writeValueback to summary
public void writeValue(IonReader reader) throws IOException

Implements com.amazon.ion.IonWriter.writeValue.

Doc from com.amazon.ion.IonWriter.writeValue.

Writes the current value from a reader.

This method also writes annotations and field names (if in a struct), and performs a deep write, including the contents of any containers encountered.

writeValuesback to summary
public void writeValues(IonReader reader) throws IOException

Implements com.amazon.ion.IonWriter.writeValues.

Doc from com.amazon.ion.IonWriter.writeValues.

Writes a reader's current value, and all following values until the end of the current container. If there's no current value then this method calls IonReader#next() to get going.

This method iterates until IonReader#next() returns null and does not step out to the container of the current cursor position.

This method also writes annotations and field names (if in a struct), and performs a deep write, including the contents of any containers encountered.

com.amazon.ion.impl.bin back to summary

public Interface IonBinaryWriterAdapter.Factory


Simple interface for constructing an IonWriter from an output stream. Essentially used as a polymorphic constructor.

Method Summary

Modifier and TypeMethod and Description
public IonWriter
create(final OutputStream out)

Method Detail

createback to summary
public IonWriter create(final OutputStream out) throws IOException
com.amazon.ion.impl.bin back to summary

private Class IonBinaryWriterAdapter.InternalByteArrayOutputStream

extends ByteArrayOutputStream
Class Inheritance

Internal ByteArrayOutputStream implementation to get access to the buffer.

Field Summary

Inherited from java.io.ByteArrayOutputStream:
bufcount

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public byte[]
Inherited from java.io.ByteArrayOutputStream:
closeresetsizetoByteArraytoStringtoStringtoStringtoStringwritewritewriteByteswriteTo

Constructor Detail

InternalByteArrayOutputStreamback to summary
private InternalByteArrayOutputStream()

Method Detail

bytesback to summary
public byte[] bytes()