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

pack-priv final Class AppendableFastAppendable

extends Object
implements _Private_FastAppendable, Closeable, Flushable
Class Inheritance
All Implemented Interfaces
java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable, com.amazon.ion.util._Private_FastAppendable, java.lang.Appendable
Imports
com.amazon.ion.util._Private_FastAppendable, java.io.Closeable, .Flushable, .IOException

Adapts an Appendable to implement _Private_FastAppendable.

Field Summary

Modifier and TypeField and Description
private final Appendable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Appendable
append(CharSequence
The character sequence to append. If csq is null, then the four characters "null" are appended to this Appendable.
csq
)

Implements java.lang.Appendable.append.

Appends the specified character sequence to this Appendable.

public Appendable
append(char
The character to append
c
)

Implements java.lang.Appendable.append.

Appends the specified character to this Appendable.

public Appendable
append(CharSequence
The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".
csq
,
int
The index of the first character in the subsequence
start
,
int
The index of the character following the last character in the subsequence
end
)

Implements java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this Appendable.

public final void
appendAscii(char c)

Implements com.amazon.ion.util._Private_FastAppendable.appendAscii.

High performance method for appending an ASCII character.

public final void
appendAscii(CharSequence csq)

Implements com.amazon.ion.util._Private_FastAppendable.appendAscii.

High performance method for appending a sequence of ASCII characters.

public final void
appendAscii(CharSequence csq, int start, int end)

Implements com.amazon.ion.util._Private_FastAppendable.appendAscii.

High performance method for appending a range in sequence of ASCII characters.

public final void
appendUtf16(char c)

Implements com.amazon.ion.util._Private_FastAppendable.appendUtf16.

High performance method for appending a UTF-16 non-surrogate character.

public final void
appendUtf16Surrogate(char leadSurrogate, char trailSurrogate)

Implements com.amazon.ion.util._Private_FastAppendable.appendUtf16Surrogate.

High performance method for appending a UTF-16 surrogate pair.

public void
close()

Implements java.io.Closeable.close.

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

public void
flush()

Implements java.io.Flushable.flush.

Flushes this stream by writing any buffered output to the underlying stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_outback to summary
private final Appendable _out

Constructor Detail

AppendableFastAppendableback to summary
pack-priv AppendableFastAppendable(Appendable out)

Method Detail

appendback to summary
public Appendable append(CharSequence csq) throws IOException

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends the specified character sequence to this Appendable.

Depending on which class implements the character sequence csq, the entire sequence may not be appended. For instance, if csq is a java.nio.CharBuffer then the subsequence to append is defined by the buffer's position and limit.

The contents of this Appendable are unspecified if the CharSequence is modified during the method call or an exception is thrown when accessing the CharSequence.

Parameters
csq:CharSequence

The character sequence to append. If csq is null, then the four characters "null" are appended to this Appendable.

Returns:Appendable

A reference to this Appendable

Exceptions
IOException:
If an I/O error occurs
appendback to summary
public Appendable append(char c) throws IOException

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends the specified character to this Appendable.

Parameters
c:char

The character to append

Returns:Appendable

A reference to this Appendable

Exceptions
IOException:
If an I/O error occurs
appendback to summary
public Appendable append(CharSequence csq, int start, int end) throws IOException

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this Appendable.

An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

    out.append(csq.subSequence(start, end)) 

The contents of this Appendable are unspecified if the CharSequence is modified during the method call or an exception is thrown when accessing the CharSequence.

Parameters
csq:CharSequence

The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".

start:int

The index of the first character in the subsequence

end:int

The index of the character following the last character in the subsequence

Returns:Appendable

A reference to this Appendable

Exceptions
IOException:
If an I/O error occurs
appendAsciiback to summary
public final void appendAscii(char c) throws IOException

Implements com.amazon.ion.util._Private_FastAppendable.appendAscii.

Doc from com.amazon.ion.util._Private_FastAppendable.appendAscii.

High performance method for appending an ASCII character. METHOD DOESN'T VERIFY IF CHARACTER IS ASCII.

appendAsciiback to summary
public final void appendAscii(CharSequence csq) throws IOException

Implements com.amazon.ion.util._Private_FastAppendable.appendAscii.

Doc from com.amazon.ion.util._Private_FastAppendable.appendAscii.

High performance method for appending a sequence of ASCII characters. METHOD DOESN'T VERIFY IF CHARACTERS ARE ASCII.

appendAsciiback to summary
public final void appendAscii(CharSequence csq, int start, int end) throws IOException

Implements com.amazon.ion.util._Private_FastAppendable.appendAscii.

Doc from com.amazon.ion.util._Private_FastAppendable.appendAscii.

High performance method for appending a range in sequence of ASCII characters. METHOD DOESN'T VERIFY IF CHARACTERS ARE ASCII.

appendUtf16back to summary
public final void appendUtf16(char c) throws IOException

Implements com.amazon.ion.util._Private_FastAppendable.appendUtf16.

Doc from com.amazon.ion.util._Private_FastAppendable.appendUtf16.

High performance method for appending a UTF-16 non-surrogate character. METHOD DOESN'T VERIFY IF CHARACTER IS OR IS NOT SURROGATE.

appendUtf16Surrogateback to summary
public final void appendUtf16Surrogate(char leadSurrogate, char trailSurrogate) throws IOException

Implements com.amazon.ion.util._Private_FastAppendable.appendUtf16Surrogate.

Doc from com.amazon.ion.util._Private_FastAppendable.appendUtf16Surrogate.

High performance method for appending a UTF-16 surrogate pair. METHOD DOESN'T VERIFY IF LEAD AND TRAIL SURROGATES ARE VALID.

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.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.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Exceptions
IOException:
if an I/O error occurs
flushback to summary
public void flush() throws IOException

Implements java.io.Flushable.flush.

Doc from java.io.Flushable.flush.

Flushes this stream by writing any buffered output to the underlying stream.

Exceptions
IOException:
If an I/O error occurs