Top |
Functions
Description
Data output stream implements GOutputStream and includes functions for writing data directly to an output stream.
Functions
g_data_output_stream_new ()
GDataOutputStream *
g_data_output_stream_new (GOutputStream *base_stream
);
Creates a new data output stream for base_stream
.
g_data_output_stream_set_byte_order ()
void g_data_output_stream_set_byte_order (GDataOutputStream *stream
,GDataStreamByteOrder order
);
Sets the byte order of the data output stream to order
.
g_data_output_stream_get_byte_order ()
GDataStreamByteOrder
g_data_output_stream_get_byte_order (GDataOutputStream *stream
);
Gets the byte order for the stream.
g_data_output_stream_put_byte ()
gboolean g_data_output_stream_put_byte (GDataOutputStream *stream
,guchar data
,GCancellable *cancellable
,GError **error
);
Puts a byte into the output stream.
Parameters
stream |
||
data |
a guchar. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
g_data_output_stream_put_int16 ()
gboolean g_data_output_stream_put_int16 (GDataOutputStream *stream
,gint16 data
,GCancellable *cancellable
,GError **error
);
Puts a signed 16-bit integer into the output stream.
Parameters
stream |
||
data |
a gint16. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
g_data_output_stream_put_uint16 ()
gboolean g_data_output_stream_put_uint16 (GDataOutputStream *stream
,guint16 data
,GCancellable *cancellable
,GError **error
);
Puts an unsigned 16-bit integer into the output stream.
Parameters
stream |
||
data |
a guint16. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
g_data_output_stream_put_int32 ()
gboolean g_data_output_stream_put_int32 (GDataOutputStream *stream
,gint32 data
,GCancellable *cancellable
,GError **error
);
Puts a signed 32-bit integer into the output stream.
Parameters
stream |
||
data |
a gint32. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
g_data_output_stream_put_uint32 ()
gboolean g_data_output_stream_put_uint32 (GDataOutputStream *stream
,guint32 data
,GCancellable *cancellable
,GError **error
);
Puts an unsigned 32-bit integer into the stream.
Parameters
stream |
||
data |
a guint32. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
g_data_output_stream_put_int64 ()
gboolean g_data_output_stream_put_int64 (GDataOutputStream *stream
,gint64 data
,GCancellable *cancellable
,GError **error
);
Puts a signed 64-bit integer into the stream.
Parameters
stream |
||
data |
a gint64. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
g_data_output_stream_put_uint64 ()
gboolean g_data_output_stream_put_uint64 (GDataOutputStream *stream
,guint64 data
,GCancellable *cancellable
,GError **error
);
Puts an unsigned 64-bit integer into the stream.
Parameters
stream |
||
data |
a guint64. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
g_data_output_stream_put_string ()
gboolean g_data_output_stream_put_string (GDataOutputStream *stream
,const char *str
,GCancellable *cancellable
,GError **error
);
Puts a string into the output stream.
Parameters
stream |
||
str |
a string. |
|
cancellable |
optional GCancellable object, |
[allow-none] |
error |
Types and Values
struct GDataOutputStream
struct GDataOutputStream;
An implementation of GBufferedOutputStream that allows for high-level data manipulation of arbitrary data (including binary operations).
Property Details
The “byte-order”
property
“byte-order” GDataStreamByteOrder
Determines the byte ordering that is used when writing multi-byte entities (such as integers) to the stream.
Flags: Read / Write
Default value: G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN