Learn R Programming

RGtk2 (version 2.20.31)

gMemoryOutputStreamNew: gMemoryOutputStreamNew

Description

Creates a new GMemoryOutputStream.

Usage

gMemoryOutputStreamNew(len)

Arguments

len
the size of data

Value

A list containing the following elements:
retval
[GOutputStream] A newly created GMemoryOutputStream object.
data
pointer to a chunk of memory to use, or NULL

Details

If data is non-NULL, the stream will use that for its internal storage. If realloc.fn is non-NULL, it will be used for resizing the internal storage when necessary. To construct a fixed-size output stream, pass NULL as realloc.fn.
## a stream that can grow
stream <- gMemoryOutputStream(0)

## fixed-size streams are not supported