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__()
__init__(source: object)
clearData()None

Empties the buffer.

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.

getData()object

Returns the contents of the data stream as a string.

getDataSize()int

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

setData(data: object)None