Class: Wx::OutputStream
- Inherits:
-
StreamBase
- Object
- StreamBase
- Wx::OutputStream
- Defined in:
- lib/wx/doc/gen/fs_file.rb,
lib/wx/doc/stream.rb
Overview
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
Instance Method Summary collapse
-
#close ⇒ Boolean
Closes the stream, returning false if an error occurs.
-
#initialize ⇒ Wx::OutputStream
constructor
Creates a dummy OutputStream object.
-
#last_write ⇒ Integer
Returns the number of bytes written during the last #write.
-
#put_c(c) ⇒ void
Puts the specified character in the output queue and increments the stream position.
-
#seek_o(pos, mode = Wx::SeekMode::FromStart) ⇒ Integer
Changes the stream current position.
-
#tell_o ⇒ Integer
Returns the current stream position.
- #write(*args) ⇒ Object
-
#write_all(buffer) ⇒ Integer
Writes bytes from buffer to stream.
Methods inherited from StreamBase
#get_last_error, #get_length, #get_size, #is_ok, #is_seekable, #reset
Constructor Details
#initialize ⇒ Wx::OutputStream
Creates a dummy Wx::OutputStream object.
298 |
# File 'lib/wx/doc/gen/fs_file.rb', line 298 def initialize; end |
Instance Method Details
#close ⇒ Boolean
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.
305 |
# File 'lib/wx/doc/gen/fs_file.rb', line 305 def close; end |
#last_write ⇒ Integer
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.
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.
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.
324 |
# File 'lib/wx/doc/gen/fs_file.rb', line 324 def seek_o(pos, mode=Wx::SeekMode::FromStart) end |
#tell_o ⇒ Integer
Returns the current stream position.
328 |
# File 'lib/wx/doc/gen/fs_file.rb', line 328 def tell_o; end |
#write(buffer) ⇒ Integer #write(input) ⇒ self
39 |
# File 'lib/wx/doc/stream.rb', line 39 def write(*args); end |
#write_all(buffer) ⇒ Integer
Writes bytes from buffer to stream.
44 |
# File 'lib/wx/doc/stream.rb', line 44 def write_all(buffer); end |