gi-gio-2.0.14: Gio bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.MemoryInputStream

Contents

Description

MemoryInputStream is a class for using arbitrary memory chunks as input for GIO streaming input operations.

As of GLib 2.34, MemoryInputStream implements PollableInputStream.

Synopsis

Exported types

Methods

addBytes

memoryInputStreamAddBytes Source #

Arguments

:: (HasCallStack, MonadIO m, IsMemoryInputStream a) 
=> a

stream: a MemoryInputStream

-> Bytes

bytes: input data

-> m () 

Appends bytes to data that can be read from the input stream.

Since: 2.34

addData

memoryInputStreamAddData Source #

Arguments

:: (HasCallStack, MonadIO m, IsMemoryInputStream a) 
=> a

stream: a MemoryInputStream

-> ByteString

data: input data

-> Maybe DestroyNotify

destroy: function that is called to free data, or Nothing

-> m () 

Appends data to data that can be read from the input stream

new

memoryInputStreamNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m MemoryInputStream

Returns: a new InputStream

Creates a new empty MemoryInputStream.

newFromBytes

memoryInputStreamNewFromBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Bytes

bytes: a Bytes

-> m MemoryInputStream

Returns: new InputStream read from bytes

Creates a new MemoryInputStream with data from the given bytes.

Since: 2.34

newFromData

memoryInputStreamNewFromData Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

data: input data

-> Maybe DestroyNotify

destroy: function that is called to free data, or Nothing

-> m MemoryInputStream

Returns: new InputStream read from data of len bytes.

Creates a new MemoryInputStream with data in memory of a given size.