streams.types.buffered

Defines buffered input and output streams that wrap around any other stream, to allow it to buffer contents and flush only when full (or when a manual flush() is called).

Members

Functions

bufferedInputStreamFor
BufferedInputStream!(S, BufferSize) bufferedInputStreamFor(S stream)

Creates and returns a buffered input stream that's wrapped around the given input stream.

bufferedOutputStreamFor
BufferedOutputStream!(S, BufferSize) bufferedOutputStreamFor(S stream)

Creates and returns a buffered output stream that's wrapped around the given output stream.

Structs

BufferedInputStream
struct BufferedInputStream(S, uint BufferSize = DEFAULT_BUFFER_SIZE)

A buffered wrapper around another input stream, that buffers data that's been read into an internal buffer, so that calls to readToStream don't all necessitate reading from the underlying resource.

BufferedOutputStream
struct BufferedOutputStream(S, uint BufferSize = DEFAULT_BUFFER_SIZE)

A buffered wrapper around another output stream, that buffers writes up to BufferSize elements before flushing the buffer to the underlying stream.

Variables

DEFAULT_BUFFER_SIZE
uint DEFAULT_BUFFER_SIZE;

The default size for buffered input and output streams.

Meta