write

open override fun write(c: Int)

Writes a single character.

Throws

IOException

If an I/O error occurs


open override fun write(cbuf: CharArray, off: Int, len: Int)

Writes a portion of an array of characters.

Ordinarily this method stores characters from the given array into this stream's buffer, flushing the buffer to the underlying stream as needed. If the requested length is at least as large as the buffer, however, then this method will flush the buffer and write the characters directly to the underlying stream. Thus redundant BufferedWriters will not copy data unnecessarily.

Parameters

cbuf

A character array

off

Offset from which to start reading characters

len

Number of characters to write

Throws

If off is negative, or len is negative, or off + len is negative or greater than the length of the given array

IOException

If an I/O error occurs


open override fun write(s: String, off: Int, len: Int)

Writes a portion of a String.

Parameters

s

String to be written

off

Offset from which to start reading characters

len

Number of characters to be written

Throws

If off is negative, or off + len is greater than the length of the given string

IOException

If an I/O error occurs