panda3d.core.StringStream

from panda3d.core import StringStream
class StringStream

Bases: iostream

A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string in Python 2 or a bytes object in Python 3.

Inheritance diagram

Inheritance diagram of StringStream

__init__() → None
__init__(source: object) → None
clearData() → None

Empties the buffer.

getDataSize() → size_t

Returns the number of characters available to be read from the data stream.

Return type

size_t

getData() → object

Returns the contents of the data stream as a string.

setData(data: object) → None
property data
Getter

Returns the contents of the data stream as a string.

Setter

Replaces the contents of the data stream. This implicitly reseeks to 0.

Replaces the contents of the data stream. This implicitly reseeks to 0.