Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
Data output stream implements OutputStream
and includes functions for
writing data directly to an output stream.
Synopsis
- newtype DataOutputStream = DataOutputStream (ManagedPtr DataOutputStream)
- class (GObject o, IsDescendantOf DataOutputStream o) => IsDataOutputStream o
- toDataOutputStream :: (MonadIO m, IsDataOutputStream o) => o -> m DataOutputStream
- dataOutputStreamGetByteOrder :: (HasCallStack, MonadIO m, IsDataOutputStream a) => a -> m DataStreamByteOrder
- dataOutputStreamNew :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m DataOutputStream
- dataOutputStreamPutByte :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word8 -> Maybe b -> m ()
- dataOutputStreamPutInt16 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int16 -> Maybe b -> m ()
- dataOutputStreamPutInt32 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> m ()
- dataOutputStreamPutInt64 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int64 -> Maybe b -> m ()
- dataOutputStreamPutString :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Text -> Maybe b -> m ()
- dataOutputStreamPutUint16 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word16 -> Maybe b -> m ()
- dataOutputStreamPutUint32 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word32 -> Maybe b -> m ()
- dataOutputStreamPutUint64 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word64 -> Maybe b -> m ()
- dataOutputStreamSetByteOrder :: (HasCallStack, MonadIO m, IsDataOutputStream a) => a -> DataStreamByteOrder -> m ()
- constructDataOutputStreamByteOrder :: (IsDataOutputStream o, MonadIO m) => DataStreamByteOrder -> m (GValueConstruct o)
- getDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> m DataStreamByteOrder
- setDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> DataStreamByteOrder -> m ()
Exported types
newtype DataOutputStream Source #
Memory-managed wrapper type.
Instances
Eq DataOutputStream Source # | |
Defined in GI.Gio.Objects.DataOutputStream (==) :: DataOutputStream -> DataOutputStream -> Bool # (/=) :: DataOutputStream -> DataOutputStream -> Bool # | |
IsGValue DataOutputStream Source # | Convert |
Defined in GI.Gio.Objects.DataOutputStream toGValue :: DataOutputStream -> IO GValue # fromGValue :: GValue -> IO DataOutputStream # | |
ManagedPtrNewtype DataOutputStream Source # | |
Defined in GI.Gio.Objects.DataOutputStream | |
TypedObject DataOutputStream Source # | |
Defined in GI.Gio.Objects.DataOutputStream | |
GObject DataOutputStream Source # | |
Defined in GI.Gio.Objects.DataOutputStream | |
HasParentTypes DataOutputStream Source # | |
Defined in GI.Gio.Objects.DataOutputStream | |
type ParentTypes DataOutputStream Source # | |
Defined in GI.Gio.Objects.DataOutputStream |
class (GObject o, IsDescendantOf DataOutputStream o) => IsDataOutputStream o Source #
Type class for types which can be safely cast to DataOutputStream
, for instance with toDataOutputStream
.
Instances
(GObject o, IsDescendantOf DataOutputStream o) => IsDataOutputStream o Source # | |
Defined in GI.Gio.Objects.DataOutputStream |
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
Overloaded methods
getByteOrder
dataOutputStreamGetByteOrder Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a) | |
=> a |
|
-> m DataStreamByteOrder | Returns: the |
Gets the byte order for the stream.
new
:: (HasCallStack, MonadIO m, IsOutputStream a) | |
=> a |
|
-> m DataOutputStream | Returns: |
Creates a new data output stream for baseStream
.
putByte
dataOutputStreamPutByte Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Word8 |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts a byte into the output stream.
putInt16
dataOutputStreamPutInt16 Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Int16 |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts a signed 16-bit integer into the output stream.
putInt32
dataOutputStreamPutInt32 Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts a signed 32-bit integer into the output stream.
putInt64
dataOutputStreamPutInt64 Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Int64 |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts a signed 64-bit integer into the stream.
putString
dataOutputStreamPutString Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts a string into the output stream.
putUint16
dataOutputStreamPutUint16 Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Word16 |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts an unsigned 16-bit integer into the output stream.
putUint32
dataOutputStreamPutUint32 Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Word32 |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts an unsigned 32-bit integer into the stream.
putUint64
dataOutputStreamPutUint64 Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) | |
=> a |
|
-> Word64 |
|
-> Maybe b |
|
-> m () | (Can throw |
Puts an unsigned 64-bit integer into the stream.
setByteOrder
dataOutputStreamSetByteOrder Source #
:: (HasCallStack, MonadIO m, IsDataOutputStream a) | |
=> a |
|
-> DataStreamByteOrder |
|
-> 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, MonadIO m) => DataStreamByteOrder -> m (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 ]