Class: Wx::OutputStream

Inherits:
StreamBase show all
Defined in:
lib/wx/doc/gen/fs_file.rb,
lib/wx/doc/stream.rb

Overview

Note:

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

OutputStream is an abstract base class which may not be used directly.

It is the base class of all streams which provide a #write function, i.e. which can be used to output data (e.g. to a file, to a socket, etc). If you want to create your own output stream, you’ll need to derive from this class and implement the protected on_sys_write function only.

Category: Streams

Requires:

  • USE_FILESYSTEM

Instance Method Summary collapse

Methods inherited from StreamBase

#get_last_error, #get_length, #get_size, #is_ok, #is_seekable, #reset

Constructor Details

#initializeWx::OutputStream

Creates a dummy Wx::OutputStream object.



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

def initialize; end

Instance Method Details

#closeBoolean

Closes the stream, returning false if an error occurs.

The stream is closed implicitly in the destructor if #close is not called explicitly. If this stream wraps another stream or some other resource such as a file, then the underlying resource is closed too if it is owned by this stream, or left open otherwise.

Returns:

  • (Boolean)


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

def close; end

#last_writeInteger

Returns the number of bytes written during the last #write.

It may return 0 even if there is no error on the stream if it is only temporarily impossible to write to it.

Returns:

  • (Integer)


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

def last_write; end

#put_c(c) ⇒ void

This method returns an undefined value.

Puts the specified character in the output queue and increments the stream position.

Parameters:

  • c (Integer)


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

def put_c(c) end

#seek_o(pos, mode = Wx::SeekMode::FromStart) ⇒ Integer

Changes the stream current position.

The new stream position or InvalidOffset on error.

Parameters:

Returns:

  • (Integer)


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

def seek_o(pos, mode=Wx::SeekMode::FromStart) end

#tell_oInteger

Returns the current stream position.

Returns:

  • (Integer)


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

def tell_o; end

#write(buffer) ⇒ Integer #write(input) ⇒ self

Overloads:

  • #write(buffer) ⇒ Integer

    Writes some or all bytes from buffer to stream.

    Parameters:

    • buffer (String)

      string with bytes to write

    Returns:

    • (Integer)

      number of bytes written

  • #write(input) ⇒ self

    Write bytes read from input stream (until eof or error)

    Parameters:

    Returns:

    • (self)


39
# File 'lib/wx/doc/stream.rb', line 39

def write(*args); end

#write_all(buffer) ⇒ Integer

Writes bytes from buffer to stream.

Parameters:

  • buffer (String)

    string with bytes to write

Returns:

  • (Integer)

    number of bytes written



44
# File 'lib/wx/doc/stream.rb', line 44

def write_all(buffer); end