40
40
<th width="100%" align="center">GIO Reference Manual</th>
41
41
<td><a accesskey="n" href="GDataOutputStream.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
43
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3120512" class="shortcut">Top</a>
45
<a href="#id3134322" class="shortcut">Description</a>
47
<a href="#id3134237" class="shortcut">Object Hierarchy</a>
49
<a href="#id3134279" class="shortcut">Properties</a></nobr></td></tr>
43
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3120599" class="shortcut">Top</a>
45
<a href="#id3197245" class="shortcut">Description</a>
47
<a href="#id3197160" class="shortcut">Object Hierarchy</a>
49
<a href="#id3197202" class="shortcut">Properties</a></nobr></td></tr>
51
51
<div class="refentry" lang="en">
52
52
<a name="GDataInputStream"></a><div class="titlepage"></div>
53
53
<div class="refnamediv"><table width="100%"><tr>
56
<a name="id3120512"></a><span class="refentrytitle">GDataInputStream</span>
56
<a name="id3120599"></a><span class="refentrytitle">GDataInputStream</span>
58
58
<p>GDataInputStream — Data Input Stream</p>
166
166
<div class="refsect1" lang="en">
167
<a name="id3134279"></a><h2>Properties</h2>
167
<a name="id3197202"></a><h2>Properties</h2>
168
168
<pre class="synopsis">
170
170
"<a class="link" href="GDataInputStream.html#GDataInputStream--byte-order">byte-order</a>" <a class="link" href="GDataInputStream.html#GDataStreamByteOrder">GDataStreamByteOrder</a> : Read / Write
174
174
<div class="refsect1" lang="en">
175
<a name="id3134322"></a><h2>Description</h2>
175
<a name="id3197245"></a><h2>Description</h2>
177
177
Data input stream implements <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> and includes functions for
178
178
reading structured data directly from a binary input stream.</p>
183
183
<div class="refsect1" lang="en">
184
<a name="id3134350"></a><h2>Details</h2>
184
<a name="id3197273"></a><h2>Details</h2>
185
185
<div class="refsect2" lang="en">
186
<a name="id3134361"></a><h3>
186
<a name="id3197284"></a><h3>
187
187
<a name="GDataInputStream-struct"></a>GDataInputStream</h3>
188
<a class="indexterm" name="id3134373"></a><pre class="programlisting">typedef struct _GDataInputStream GDataInputStream;</pre>
188
<a class="indexterm" name="id3197296"></a><pre class="programlisting">typedef struct _GDataInputStream GDataInputStream;</pre>
190
190
An implementation of <a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream"><span class="type">GBufferedInputStream</span></a> that allows for high-level
191
191
data manipulation of arbitrary data (including binary operations).</p>
201
201
<div class="refsect2" lang="en">
202
<a name="id3134405"></a><h3>
202
<a name="id3197328"></a><h3>
203
203
<a name="GDataStreamByteOrder"></a>enum GDataStreamByteOrder</h3>
204
<a class="indexterm" name="id3134416"></a><pre class="programlisting">typedef enum {
204
<a class="indexterm" name="id3197339"></a><pre class="programlisting">typedef enum {
205
205
G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN,
206
206
G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN,
207
207
G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN
238
238
<div class="refsect2" lang="en">
239
<a name="id3139118"></a><h3>
239
<a name="id3202033"></a><h3>
240
240
<a name="GDataStreamNewlineType"></a>enum GDataStreamNewlineType</h3>
241
<a class="indexterm" name="id3139130"></a><pre class="programlisting">typedef enum {
241
<a class="indexterm" name="id3202045"></a><pre class="programlisting">typedef enum {
242
242
G_DATA_STREAM_NEWLINE_TYPE_LF,
243
243
G_DATA_STREAM_NEWLINE_TYPE_CR,
244
244
G_DATA_STREAM_NEWLINE_TYPE_CR_LF,
280
280
<div class="refsect2" lang="en">
281
<a name="id3139258"></a><h3>
281
<a name="id3202173"></a><h3>
282
282
<a name="g-data-input-stream-new"></a>g_data_input_stream_new ()</h3>
283
<a class="indexterm" name="id3139270"></a><pre class="programlisting"><a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a>* g_data_input_stream_new (<a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a> *base_stream);</pre>
283
<a class="indexterm" name="id3202185"></a><pre class="programlisting"><a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a>* g_data_input_stream_new (<a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a> *base_stream);</pre>
285
285
Creates a new data input stream for the <em class="parameter"><code>base_stream</code></em>.</p>
306
306
<div class="refsect2" lang="en">
307
<a name="id3139351"></a><h3>
307
<a name="id3202266"></a><h3>
308
308
<a name="g-data-input-stream-set-byte-order"></a>g_data_input_stream_set_byte_order ()</h3>
309
<a class="indexterm" name="id3139365"></a><pre class="programlisting">void g_data_input_stream_set_byte_order (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
309
<a class="indexterm" name="id3202280"></a><pre class="programlisting">void g_data_input_stream_set_byte_order (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
310
310
<a class="link" href="GDataInputStream.html#GDataStreamByteOrder">GDataStreamByteOrder</a> order);</pre>
312
312
This function sets the byte order for the given <em class="parameter"><code>stream</code></em>. All subsequent
334
334
<div class="refsect2" lang="en">
335
<a name="id3139468"></a><h3>
335
<a name="id3202383"></a><h3>
336
336
<a name="g-data-input-stream-get-byte-order"></a>g_data_input_stream_get_byte_order ()</h3>
337
<a class="indexterm" name="id3139482"></a><pre class="programlisting"><a class="link" href="GDataInputStream.html#GDataStreamByteOrder">GDataStreamByteOrder</a> g_data_input_stream_get_byte_order (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream);</pre>
337
<a class="indexterm" name="id3202397"></a><pre class="programlisting"><a class="link" href="GDataInputStream.html#GDataStreamByteOrder">GDataStreamByteOrder</a> g_data_input_stream_get_byte_order (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream);</pre>
339
339
Gets the byte order for the data input stream.</p>
360
360
<div class="refsect2" lang="en">
361
<a name="id3139562"></a><h3>
361
<a name="id3202477"></a><h3>
362
362
<a name="g-data-input-stream-set-newline-type"></a>g_data_input_stream_set_newline_type ()</h3>
363
<a class="indexterm" name="id3139575"></a><pre class="programlisting">void g_data_input_stream_set_newline_type
363
<a class="indexterm" name="id3202490"></a><pre class="programlisting">void g_data_input_stream_set_newline_type
364
364
(<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
365
365
<a class="link" href="GDataInputStream.html#GDataStreamNewlineType">GDataStreamNewlineType</a> type);</pre>
393
393
<div class="refsect2" lang="en">
394
<a name="id3139676"></a><h3>
394
<a name="id3202590"></a><h3>
395
395
<a name="g-data-input-stream-get-newline-type"></a>g_data_input_stream_get_newline_type ()</h3>
396
<a class="indexterm" name="id3139689"></a><pre class="programlisting"><a class="link" href="GDataInputStream.html#GDataStreamNewlineType">GDataStreamNewlineType</a> g_data_input_stream_get_newline_type
396
<a class="indexterm" name="id3202604"></a><pre class="programlisting"><a class="link" href="GDataInputStream.html#GDataStreamNewlineType">GDataStreamNewlineType</a> g_data_input_stream_get_newline_type
397
397
(<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream);</pre>
399
399
Gets the current newline type for the <em class="parameter"><code>stream</code></em>.</p>
420
420
<div class="refsect2" lang="en">
421
<a name="id3139777"></a><h3>
421
<a name="id3202692"></a><h3>
422
422
<a name="g-data-input-stream-read-byte"></a>g_data_input_stream_read_byte ()</h3>
423
<a class="indexterm" name="id3139790"></a><pre class="programlisting"><a
423
<a class="indexterm" name="id3202705"></a><pre class="programlisting"><a
424
424
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
425
425
>guchar</a> g_data_input_stream_read_byte (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
426
426
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
467
467
<div class="refsect2" lang="en">
468
<a name="id3139947"></a><h3>
468
<a name="id3202862"></a><h3>
469
469
<a name="g-data-input-stream-read-int16"></a>g_data_input_stream_read_int16 ()</h3>
470
<a class="indexterm" name="id3139960"></a><pre class="programlisting"><a
470
<a class="indexterm" name="id3202875"></a><pre class="programlisting"><a
471
471
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16"
472
472
>gint16</a> g_data_input_stream_read_int16 (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
473
473
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
518
518
<div class="refsect2" lang="en">
519
<a name="id3140142"></a><h3>
519
<a name="id3203057"></a><h3>
520
520
<a name="g-data-input-stream-read-uint16"></a>g_data_input_stream_read_uint16 ()</h3>
521
<a class="indexterm" name="id3140155"></a><pre class="programlisting"><a
521
<a class="indexterm" name="id3203070"></a><pre class="programlisting"><a
522
522
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
523
523
>guint16</a> g_data_input_stream_read_uint16 (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
524
524
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
569
569
<div class="refsect2" lang="en">
570
<a name="id3140337"></a><h3>
570
<a name="id3203252"></a><h3>
571
571
<a name="g-data-input-stream-read-int32"></a>g_data_input_stream_read_int32 ()</h3>
572
<a class="indexterm" name="id3140351"></a><pre class="programlisting"><a
572
<a class="indexterm" name="id3203266"></a><pre class="programlisting"><a
573
573
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
574
574
>gint32</a> g_data_input_stream_read_int32 (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
575
575
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
627
627
<div class="refsect2" lang="en">
628
<a name="id3140563"></a><h3>
628
<a name="id3203478"></a><h3>
629
629
<a name="g-data-input-stream-read-uint32"></a>g_data_input_stream_read_uint32 ()</h3>
630
<a class="indexterm" name="id3140576"></a><pre class="programlisting"><a
630
<a class="indexterm" name="id3203491"></a><pre class="programlisting"><a
631
631
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
632
632
>guint32</a> g_data_input_stream_read_uint32 (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
633
633
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
685
685
<div class="refsect2" lang="en">
686
<a name="id3140788"></a><h3>
686
<a name="id3203703"></a><h3>
687
687
<a name="g-data-input-stream-read-int64"></a>g_data_input_stream_read_int64 ()</h3>
688
<a class="indexterm" name="id3140801"></a><pre class="programlisting"><a
688
<a class="indexterm" name="id3203716"></a><pre class="programlisting"><a
689
689
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"
690
690
>gint64</a> g_data_input_stream_read_int64 (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
691
691
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
743
743
<div class="refsect2" lang="en">
744
<a name="id3141013"></a><h3>
744
<a name="id3203928"></a><h3>
745
745
<a name="g-data-input-stream-read-uint64"></a>g_data_input_stream_read_uint64 ()</h3>
746
<a class="indexterm" name="id3141026"></a><pre class="programlisting"><a
746
<a class="indexterm" name="id3203941"></a><pre class="programlisting"><a
747
747
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
748
748
>guint64</a> g_data_input_stream_read_uint64 (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
749
749
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
801
801
<div class="refsect2" lang="en">
802
<a name="id3143742"></a><h3>
802
<a name="id3206630"></a><h3>
803
803
<a name="g-data-input-stream-read-line"></a>g_data_input_stream_read_line ()</h3>
804
<a class="indexterm" name="id3143754"></a><pre class="programlisting">char* g_data_input_stream_read_line (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
804
<a class="indexterm" name="id3206642"></a><pre class="programlisting">char* g_data_input_stream_read_line (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
806
806
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
807
807
>gsize</a> *length,
867
867
<div class="refsect2" lang="en">
868
<a name="id3143950"></a><h3>
868
<a name="id3206838"></a><h3>
869
869
<a name="g-data-input-stream-read-until"></a>g_data_input_stream_read_until ()</h3>
870
<a class="indexterm" name="id3143963"></a><pre class="programlisting">char* g_data_input_stream_read_until (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
870
<a class="indexterm" name="id3206850"></a><pre class="programlisting">char* g_data_input_stream_read_until (<a class="link" href="GDataInputStream.html" title="GDataInputStream">GDataInputStream</a> *stream,
872
872
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
873
873
>gchar</a> *stop_chars,
936
936
<div class="refsect1" lang="en">
937
<a name="id3144154"></a><h2>Property Details</h2>
937
<a name="id3207042"></a><h2>Property Details</h2>
938
938
<div class="refsect2" lang="en">
939
<a name="id3144163"></a><h3>
939
<a name="id3207051"></a><h3>
940
940
<a name="GDataInputStream--byte-order"></a>The <code class="literal">"byte-order"</code> property</h3>
941
<a class="indexterm" name="id3144178"></a><pre class="programlisting"> "byte-order" <a class="link" href="GDataInputStream.html#GDataStreamByteOrder">GDataStreamByteOrder</a> : Read / Write</pre>
941
<a class="indexterm" name="id3207066"></a><pre class="programlisting"> "byte-order" <a class="link" href="GDataInputStream.html#GDataStreamByteOrder">GDataStreamByteOrder</a> : Read / Write</pre>
942
942
<p>The byte order.</p>
943
943
<p>Default value: G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN</p>
946
946
<div class="refsect2" lang="en">
947
<a name="id3144201"></a><h3>
947
<a name="id3207088"></a><h3>
948
948
<a name="GDataInputStream--newline-type"></a>The <code class="literal">"newline-type"</code> property</h3>
949
<a class="indexterm" name="id3144215"></a><pre class="programlisting"> "newline-type" <a class="link" href="GDataInputStream.html#GDataStreamNewlineType">GDataStreamNewlineType</a> : Read / Write</pre>
949
<a class="indexterm" name="id3207103"></a><pre class="programlisting"> "newline-type" <a class="link" href="GDataInputStream.html#GDataStreamNewlineType">GDataStreamNewlineType</a> : Read / Write</pre>
950
950
<p>The accepted types of line ending.</p>
951
951
<p>Default value: G_DATA_STREAM_NEWLINE_TYPE_LF</p>
954
954
<div class="refsect1" lang="en">
955
<a name="id3144240"></a><h2>See Also</h2>
955
<a name="id3207128"></a><h2>See Also</h2>
956
956
<a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>
958
958
<div class="refsect1" lang="en">
959
<a name="id3144253"></a><div class="refsect2" lang="en"><a name="id3144254"></a></div>
959
<a name="id3207141"></a><div class="refsect2" lang="en"><a name="id3207142"></a></div>
961
<div class="refsect2" lang="en"><a name="id3144255"></a></div>
961
<div class="refsect2" lang="en"><a name="id3207143"></a></div>