gMemoryOutputStreamNew {RGtk2} | R Documentation

## gMemoryOutputStreamNew

### Description

Creates a new `GMemoryOutputStream`.

### Usage

    gMemoryOutputStreamNew(len)

### Arguments

``len`` | the size of `data`

### 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

### 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`

### Author(s)

Derived by RGtkGen from GTK+ documentation

[Package RGtk2 version 2.20.36.3 Index]