## wxMemoryOutputStream

Derived from

wxOutputStream

Include files

<wx/mstream.h>

See also

wxStreamBuffer

Members

wxMemoryOutputStream::wxMemoryOutputStream
wxMemoryOutputStream::~wxMemoryOutputStream
wxMemoryOutputStream::CopyTo

### wxMemoryOutputStream::wxMemoryOutputStream

wxMemoryOutputStream(char * data = NULL, size_t length = 0)

If data is NULL, then it will initialize a new empty buffer which will grow if required.

Warning

If the buffer is created, it will be destroyed at the destruction of the stream.

### wxMemoryOutputStream::~wxMemoryOutputStream

~wxMemoryOutputStream()

Destructor.

### wxMemoryOutputStream::CopyTo

size_t CopyTo(char *buffer, size_t len) const

CopyTo allowed you to transfer data from the internal buffer of wxMemoryOutputStream to an external buffer. len specifies the size of the buffer.

Returned value

CopyTo returns the number of bytes copied to the buffer. Generally it is either len or the size of the stream buffer.