BufferedOutputStream

Buffered output stream implements GFilterOutputStream and provides for buffered writes.

By default, GBufferedOutputStream's buffer size is set at 4 kilobytes.

To create a buffered output stream, use g_buffered_output_stream_new(), or g_buffered_output_stream_new_sized() to specify the buffer's size at construction.

To get the size of a buffer within a buffered input stream, use g_buffered_output_stream_get_buffer_size(). To change the size of a buffered output stream's buffer, use g_buffered_output_stream_set_buffer_size(). Note that the buffer's size cannot be reduced below the size of the data within the buffer.

Constructors

this
this(GBufferedOutputStream* gBufferedOutputStream)

Sets our main struct and passes it to the parent class

this
this(OutputStream baseStream)

Creates a new buffered output stream for a base stream.

this
this(OutputStream baseStream, gsize size)

Creates a new buffered output stream with a given buffer size.

Members

Functions

getAutoGrow
int getAutoGrow()

Checks if the buffer automatically grows as data is added.

getBufferSize
gsize getBufferSize()

Gets the size of the buffer in the stream.

getBufferedOutputStreamStruct
GBufferedOutputStream* getBufferedOutputStreamStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setAutoGrow
void setAutoGrow(int autoGrow)

Sets whether or not the stream's buffer should automatically grow. If auto_grow is true, then each write will just make the buffer larger, and you must manually flush the buffer to actually write out the data to the underlying stream.

setBufferSize
void setBufferSize(gsize size)

Sets the size of the internal buffer to size.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

gBufferedOutputStream
GBufferedOutputStream* gBufferedOutputStream;

the main Gtk struct

Inherited Members

From FilterOutputStream

gFilterOutputStream
GFilterOutputStream* gFilterOutputStream;

the main Gtk struct

getFilterOutputStreamStruct
GFilterOutputStream* getFilterOutputStreamStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getBaseStream
OutputStream getBaseStream()

Gets the base stream for the filter stream.

getCloseBaseStream
int getCloseBaseStream()

Returns whether the base stream will be closed when stream is closed.

setCloseBaseStream
void setCloseBaseStream(int closeBase)

Sets whether the base stream will be closed when stream is closed.

Meta