MemoryOutputStream

OutputStream that collects the written data in memory and allows to query it as a byte array.

Constructors

this
deprecated this(IAllocator alloc)
Undocumented in source.
this
this(IAllocator alloc, bool dummy)

private

Members

Aliases

write
alias write = OutputStream.write
Undocumented in source.

Functions

finalize
void finalize()
Undocumented in source. Be warned that the author may not have intended to support it.
flush
void flush()
Undocumented in source. Be warned that the author may not have intended to support it.
reserve
void reserve(size_t nbytes)

Reserves space for data - useful for optimization.

reset
void reset(AppenderResetMode mode)

Resets the stream to its initial state containing no data.

write
size_t write(ubyte[] bytes, IOMode )
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

data
ubyte[] data [@property getter]

An array with all data written to the stream so far.

Inherited Members

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.

write
deprecated void write(InputStream stream, ulong nbytes)

Pipes an InputStream directly into this OutputStream.

Meta