Stream

Interface for all classes implementing readable and writable streams.

interface Stream : InputStream , OutputStream

Inherited Members

From InputStream

empty
bool empty [@property getter]

Returns true iff the end of the input stream has been reached.

leastSize
ulong leastSize [@property getter]

(Scheduled for deprecation) Returns the maximum number of bytes that are known to remain available for read.

dataAvailableForRead
bool dataAvailableForRead [@property getter]

(Scheduled for deprecation) Queries if there is data available for immediate, non-blocking read.

peek
const(ubyte)[] peek()

Returns a temporary reference to the data that is currently buffered.

read
size_t read(ubyte[] dst, IOMode mode)
void read(ubyte[] dst)

Fills the preallocated array 'bytes' with data from the stream.

From OutputStream

write
size_t write(ubyte[] bytes, IOMode mode)
void write(ubyte[] bytes)
void write(char[] bytes)

Writes an array of bytes to the stream.

flush
void flush()

Flushes the stream and makes sure that all data is being written to the output device.

finalize
void finalize()

Flushes and finalizes the stream.

Meta