This class is the base class of most stream related classes in wxWidgets.
It must not be used directly.
See also
StreamBuffer
wx.InputStream, wx.OutputStream
Creates a dummy stream object. |
|
This function returns the last error. |
|
Returns the length of the stream in bytes. |
|
This function returns the size of the stream. |
|
Returns |
|
Returns |
|
Resets the stream state. |
See |
|
See |
|
See |
wx.
StreamBase
(object)¶Possible constructors:
StreamBase()
This class is the base class of most stream related classes in wxWidgets.
__init__
(self)¶Creates a dummy stream object.
It doesn’t do anything.
GetLastError
(self)¶This function returns the last error.
GetLength
(self)¶Returns the length of the stream in bytes.
If the length cannot be determined (this is always the case for socket streams for example), returns InvalidOffset
.
wx.FileOffset
New in version 2.5.4.
GetSize
(self)¶This function returns the size of the stream.
For example, for a file it is the size of the file.
int
Warning
There are streams which do not have size by definition, such as socket streams. In that cases, GetSize
returns 0 so you should always test its return value.
IsOk
(self)¶Returns True
if no error occurred on the stream.
bool
See also
IsSeekable
(self)¶Returns True
if the stream supports seeking to arbitrary offsets.
bool
Reset
(self, error=STREAM_NO_ERROR)¶Resets the stream state.
By default, resets the stream to good state, i.e. clears any errors. Since wxWidgets 2.9.3 can be also used to explicitly set the state to the specified error (the error argument didn’t exist in the previous versions).
error (StreamError) –
See also
LastError
¶See GetLastError