gi-gio-2.0.12: 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.BufferedOutputStream

Contents

Description

Buffered output stream implements FilterOutputStream and provides for buffered writes.

By default, 'GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream'\'s buffer size is set at 4 kilobytes.

To create a buffered output stream, use bufferedOutputStreamNew, or bufferedOutputStreamNewSized to specify the buffer's size at construction.

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

Synopsis

Exported types

Methods

getAutoGrow

bufferedOutputStreamGetAutoGrow Source #

Arguments

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

stream: a BufferedOutputStream.

-> m Bool

Returns: True if the stream's buffer automatically grows, False otherwise.

Checks if the buffer automatically grows as data is added.

getBufferSize

bufferedOutputStreamGetBufferSize Source #

Arguments

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

stream: a BufferedOutputStream.

-> m Word64

Returns: the current size of the buffer.

Gets the size of the buffer in the stream.

new

bufferedOutputStreamNew Source #

Arguments

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

baseStream: a OutputStream.

-> m BufferedOutputStream

Returns: a OutputStream for the given baseStream.

Creates a new buffered output stream for a base stream.

newSized

bufferedOutputStreamNewSized Source #

Arguments

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

baseStream: a OutputStream.

-> Word64

size: a gsize.

-> m BufferedOutputStream

Returns: a OutputStream with an internal buffer set to size.

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

setAutoGrow

bufferedOutputStreamSetAutoGrow Source #

Arguments

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

stream: a BufferedOutputStream.

-> Bool

autoGrow: a Bool.

-> m () 

Sets whether or not the stream's buffer should automatically grow. If autoGrow 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

bufferedOutputStreamSetBufferSize Source #

Arguments

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

stream: a BufferedOutputStream.

-> Word64

size: a gsize.

-> m () 

Sets the size of the internal buffer to size.

Properties

autoGrow

data BufferedOutputStreamAutoGrowPropertyInfo Source #

Instances

AttrInfo BufferedOutputStreamAutoGrowPropertyInfo Source # 
type AttrOrigin BufferedOutputStreamAutoGrowPropertyInfo Source # 
type AttrLabel BufferedOutputStreamAutoGrowPropertyInfo Source # 
type AttrGetType BufferedOutputStreamAutoGrowPropertyInfo Source # 
type AttrBaseTypeConstraint BufferedOutputStreamAutoGrowPropertyInfo Source # 
type AttrSetTypeConstraint BufferedOutputStreamAutoGrowPropertyInfo Source # 
type AttrAllowedOps BufferedOutputStreamAutoGrowPropertyInfo Source # 

bufferSize

data BufferedOutputStreamBufferSizePropertyInfo Source #

Instances

AttrInfo BufferedOutputStreamBufferSizePropertyInfo Source # 
type AttrOrigin BufferedOutputStreamBufferSizePropertyInfo Source # 
type AttrLabel BufferedOutputStreamBufferSizePropertyInfo Source # 
type AttrGetType BufferedOutputStreamBufferSizePropertyInfo Source # 
type AttrBaseTypeConstraint BufferedOutputStreamBufferSizePropertyInfo Source # 
type AttrSetTypeConstraint BufferedOutputStreamBufferSizePropertyInfo Source # 
type AttrAllowedOps BufferedOutputStreamBufferSizePropertyInfo Source #