gi-gio-2.0.18: 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.DataOutputStream

Contents

Description

Data output stream implements OutputStream and includes functions for writing data directly to an output stream.

Synopsis

Exported types

class GObject o => IsDataOutputStream o Source #

Type class for types which can be safely cast to DataOutputStream, for instance with toDataOutputStream.

toDataOutputStream :: (MonadIO m, IsDataOutputStream o) => o -> m DataOutputStream Source #

Cast to DataOutputStream, for types for which this is known to be safe. For general casts, use castTo.

Methods

getByteOrder

dataOutputStreamGetByteOrder Source #

Arguments

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

stream: a DataOutputStream.

-> m DataStreamByteOrder

Returns: the DataStreamByteOrder for the stream.

Gets the byte order for the stream.

new

dataOutputStreamNew Source #

Arguments

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

baseStream: a OutputStream.

-> m DataOutputStream

Returns: DataOutputStream.

Creates a new data output stream for baseStream.

putByte

dataOutputStreamPutByte Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Word8

data: a guchar.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts a byte into the output stream.

putInt16

dataOutputStreamPutInt16 Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Int16

data: a gint16.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts a signed 16-bit integer into the output stream.

putInt32

dataOutputStreamPutInt32 Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Int32

data: a gint32.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts a signed 32-bit integer into the output stream.

putInt64

dataOutputStreamPutInt64 Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Int64

data: a gint64.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts a signed 64-bit integer into the stream.

putString

dataOutputStreamPutString Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Text

str: a string.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts a string into the output stream.

putUint16

dataOutputStreamPutUint16 Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Word16

data: a guint16.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts an unsigned 16-bit integer into the output stream.

putUint32

dataOutputStreamPutUint32 Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Word32

data: a guint32.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts an unsigned 32-bit integer into the stream.

putUint64

dataOutputStreamPutUint64 Source #

Arguments

:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) 
=> a

stream: a DataOutputStream.

-> Word64

data: a guint64.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m ()

(Can throw GError)

Puts an unsigned 64-bit integer into the stream.

setByteOrder

dataOutputStreamSetByteOrder Source #

Arguments

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

stream: a DataOutputStream.

-> DataStreamByteOrder

order: a GDataStreamByteOrder.

-> m () 

Sets the byte order of the data output stream to order.

Properties

byteOrder

Determines the byte ordering that is used when writing multi-byte entities (such as integers) to the stream.

constructDataOutputStreamByteOrder :: IsDataOutputStream o => DataStreamByteOrder -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “byte-order” property. This is rarely needed directly, but it is used by new.

getDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> m DataStreamByteOrder Source #

Get the value of the “byte-order” property. When overloading is enabled, this is equivalent to

get dataOutputStream #byteOrder

setDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> DataStreamByteOrder -> m () Source #

Set the value of the “byte-order” property. When overloading is enabled, this is equivalent to

set dataOutputStream [ #byteOrder := value ]