oeosstream

class oeosstream : public oeostream

This class represents oeosstream.

Implements an output stream that writes into an internally contained string.

The following methods are publicly inherited from oeostream:

operator<

flush

putbyte

close

open

write

The following methods are publicly inherited from oestream:

operator bool

rewind

tell

eof

seek

length

size

Constructors

oeosstream() -> oeosstream
oeosstream(arg2: str, arg3: oesize_t) -> oeosstream
oeosstream(arg2: str) -> oeosstream

Creates a new oeosstream which is immediately ready to be written to. Passing any of the specified parameters to one of the non-default constructors is equivalent to creating a new oeosstream with the default constructor and then calling the appropriate oeosstream.set method.

If the copy constructor is used, the entire contents of the other stream’s internal string are copied into the newly constructed stream’s internal string.

clear

clear() -> None

Clears the contents of the internal string.

set

set(arg2: str) -> bool
set(arg2: str, arg3: oesize_t) -> bool

Sets the contents of the internal string to the contents of the specified ‘buffer’. If the ‘len’ parameter is not specified, this method will copy the contents of the specified ‘buffer’ until a null character is reached. The null character is not copied. Returns whether or not the contents were successfully copied.

str

str() -> bytes

Returns a copy of the current internal string.