StringWriter

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun append(c: Char): Writer

Appends the specified character to this writer.

open override fun append(csq: CharSequence?): Writer

Appends the specified character sequence to this writer.

open override fun append(csq: CharSequence?, start: Int, end: Int): Writer

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

Link copied to clipboard
open override fun close()

Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.

Link copied to clipboard
open override fun flush()

Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun write(cbuf: CharArray, off: Int, len: Int)

Writes a portion of an array of characters.

open fun write(cbuf: CharArray)

Writes an array of characters.

open fun write(c: Int)

Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.

open fun write(str: String)

Writes a string.

open fun write(str: String, off: Int, len: Int)

Writes a portion of a string.