PrintWriter

class PrintWriter(val out: Writer) : Writer

minimum port of java.io.PrintWriter just to make it work in lucene-kmp

Constructors

Link copied to clipboard
constructor(out: Writer)

Properties

Link copied to clipboard
val out: Writer

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
fun print(s: String?)

Prints a string, mapping null to "null" (matches java.io.PrintWriter behavior).

Link copied to clipboard
fun println()

Terminates the current line by writing the line separator string. The line separator is System.lineSeparator and is not necessarily a single newline character ('\n').

fun println(x: String?)

Prints a String and then terminates the line. This method behaves as though it invokes .print and then .println.

Link copied to clipboard
open override fun write(str: String)

Writes a string. This method cannot be inherited from the Writer class because it must suppress I/O exceptions.

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, off: Int, len: Int)

Writes a portion of a string.