Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login


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

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, size = 4096)
Creates a new GLib::BufferedOutputStream for base_stream, with a buffer size set to size.

Instance Methods

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


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
References:[index-ruby-glib2] [GLib::BufferedOutputStream] [index-ruby-gio2] [Ruby/GIO] [GLib::FilterOutputStream]