Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

GLib::BufferedOutputStream

class GLib::BufferedOutputStream

Buffered output stream implements GLib::FilterOutputStream and provides for buffered writes.

By default, GLib::BufferedOutputStream's buffer size is set at 4 kilobytes.

To create a buffered output stream, use GLib::BufferedOutputStream.new.

To get the size of a buffer within a buffered input stream, use GLib::BufferedOutputStream#buffer_size. To change the size of a buffered output stream’s buffer, use GLib::BufferedOutputStream#buffer_size=. Note that the buffer’s size cannot be reduced below the size of the data within the buffer.

Class Methods

GLib::BufferedOutputStream.new(base_stream, size = 4096)
Creates a new GLib::BufferedOutputStream for base_stream, with a buffer size set to size.

Instance Methods

auto_grow=(auto_grow)
Same as GLib::BufferedOutputStream#set_auto_grow.
  • Returns: auto_grow
auto_grow?
Checks if the buffer automatically grows as data is added.
  • Returns: true if this stream’s buffer automatically grows
buffer_size
Gets the size of the input buffer.
  • Returns: The size of the input buffer
buffer_size=(buffer_size)
Same as GLib::BufferedInputStream#set_buffer_size.
  • Returns: buffer_size
set_auto_grow(auto_grow)
Sets whether or not the buffer should automatically grow or not.
  • auto_grow: true if the buffer should automatically grow
  • Returns: self
set_buffer_size(buffer_size)
Sets the size of the input buffer.
  • buffer_size: The size of the input buffer
  • Returns: self

Properties

auto-grow: true or false (Read/Write)

Whether or not the buffer should automatically grow

Default value: false

buffer-size: Integer (Read/Write)

The size of the input buffer

Allowed values: ≥ 1

Default value: 4096

Last modified:2010/12/27 21:59:23
Keyword(s):
References:[index-ruby-glib2] [GLib::BufferedOutputStream] [index-ruby-gio2] [Ruby/GIO] [GLib::FilterOutputStream]