BufferedOutputStream

port of java.io.BufferedOutputStream

The class implements a buffered output stream. By setting up such an output stream, an application can write bytes to the underlying output stream without necessarily causing a call to the underlying system for each byte written.

Author

Arthur van Hoff

Since

1.0

Constructors

Link copied to clipboard
constructor(out: OutputStream)

Creates a new buffered output stream to write data to the specified underlying output stream.

constructor(out: OutputStream, size: Int)

Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()

Closes this output stream and releases any system resources associated with the stream.

Link copied to clipboard
open override fun flush()

Flushes this buffered output stream. This forces any buffered output bytes to be written out to the underlying output stream.

Link copied to clipboard

Returns true if the stream is closed. This method is added to allow subclasses to check the closed state.

Link copied to clipboard
open override fun write(b: Int)

Writes the specified byte to this buffered output stream.

open override fun write(b: ByteArray, off: Int, len: Int)

Writes len bytes from the specified byte array starting at offset off to this buffered output stream.

open override fun write(b: ByteArray)

Writes b.length bytes to this output stream.