Class: Wx::StreamBase

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/fs_file.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

This class is the base class of most stream related classes in wxWidgets.

It must not be used directly.

Category: Streams

See Also:

  • StreamBuffer

Requires:

  • USE_FILESYSTEM

Direct Known Subclasses

InputStream, OutputStream

Instance Method Summary collapse

Constructor Details

#initializeWx::StreamBase

Creates a dummy stream object.

It doesn’t do anything.



168
# File 'lib/wx/doc/gen/fs_file.rb', line 168

def initialize; end

Instance Method Details

#get_last_errorWx::StreamError Also known as: last_error

This function returns the last error.

Returns:



172
# File 'lib/wx/doc/gen/fs_file.rb', line 172

def get_last_error; end

#get_lengthInteger Also known as: length

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.

Returns:

  • (Integer)


179
# File 'lib/wx/doc/gen/fs_file.rb', line 179

def get_length; end

#get_sizeInteger Also known as: size

This function returns the size of the stream.

For example, for a file it is the size of the file. There are streams which do not have size by definition, such as socket streams. In that cases, #get_size returns 0 so you should always test its return value.

Returns:

  • (Integer)


187
# File 'lib/wx/doc/gen/fs_file.rb', line 187

def get_size; end

#is_okBoolean Also known as: ok?

Returns true if no error occurred on the stream.

Returns:

  • (Boolean)

See Also:



195
# File 'lib/wx/doc/gen/fs_file.rb', line 195

def is_ok; end

#is_seekableBoolean Also known as: seekable?

Returns true if the stream supports seeking to arbitrary offsets.

Returns:

  • (Boolean)


200
# File 'lib/wx/doc/gen/fs_file.rb', line 200

def is_seekable; end

#reset(error = Wx::StreamError::STREAM_NO_ERROR) ⇒ void

This method returns an undefined value.

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).

Parameters:

See Also:



209
# File 'lib/wx/doc/gen/fs_file.rb', line 209

def reset(error=Wx::StreamError::STREAM_NO_ERROR) end