/usr/share/gtk-doc/html/pygobject/class-giodataoutputstream.html is in python-gobject-2-dev 2.28.6-12build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.DataOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodatainputstream.html" title="gio.DataInputStream"><link rel="next" href="class-giodrive.html" title="gio.Drive"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.DataOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.DataOutputStream"><a name="class-giodataoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.DataOutputStream</h2><p>gio.DataOutputStream — Data Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id432940"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.DataOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giodataoutputstream.html#constructor-giodataoutputstream" title="Constructor">gio.DataOutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order" title="gio.DataOutputStream.get_byte_order">get_byte_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-byte" title="gio.DataOutputStream.put_byte">put_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int16" title="gio.DataOutputStream.put_int16">put_int16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int32" title="gio.DataOutputStream.put_int32">put_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int64" title="gio.DataOutputStream.put_int64">put_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-string" title="gio.DataOutputStream.put_string">put_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint16" title="gio.DataOutputStream.put_uint16">put_uint16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint32" title="gio.DataOutputStream.put_uint32">put_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint64" title="gio.DataOutputStream.put_uint64">put_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order" title="gio.DataOutputStream.set_byte_order">set_byte_order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id396268"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
+-- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a>
+-- <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream">gio.DataOutputStream</a>
</pre></div><div class="refsect1" title="gio.DataOutputStream Properties"><a name="properties-giodataoutputstream"></a><h2>gio.DataOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"byte-order"</td><td valign="top">Read - Write</td><td valign="top">Determines the byte ordering that is used when writing
multi-byte entities (such as integers) to the stream.
Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id409238"></a><h2>Description</h2><p>
<a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
and includes functions for writing data directly to an output stream.
</p></div><div class="refsect1" title="Constructor"><a name="constructor-giodataoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.DataOutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
<a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
<a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
</td></tr></tbody></table><p>
Creates a new <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
from the given base_stream.
</p></div><div class="refsect1" title="Methods"><a name="id441772"></a><h2>Methods</h2><div class="refsect2" title="gio.DataOutputStream.get_byte_order"><a name="method-giodataoutputstream--get-byte-order"></a><h3>gio.DataOutputStream.get_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_byte_order</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's current
<a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>.
</td></tr></tbody></table><p>
The <code class="methodname">get_byte_order</code>() method gets the byte
order for the stream.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_byte"><a name="method-giodataoutputstream--put-byte"></a><h3>gio.DataOutputStream.put_byte</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a char.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_byte</code>() method puts a byte into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_int16"><a name="method-giodataoutputstream--put-int16"></a><h3>gio.DataOutputStream.put_int16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint16.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_int16</code>() method puts a signed 16-bit integer into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_int32"><a name="method-giodataoutputstream--put-int32"></a><h3>gio.DataOutputStream.put_int32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint32.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_int32</code>() method puts a signed 32-bit integer into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_int64"><a name="method-giodataoutputstream--put-int64"></a><h3>gio.DataOutputStream.put_int64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint64.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_int64</code>() method puts a signed 64-bit integer into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_string"><a name="method-giodataoutputstream--put-string"></a><h3>gio.DataOutputStream.put_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>str</code></strong> :</span></p></td><td>a string.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if string was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_string</code>() method puts a string into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_uint16"><a name="method-giodataoutputstream--put-uint16"></a><h3>gio.DataOutputStream.put_uint16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint16.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_uint16</code>() method puts an unsigned 16-bit integer into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_uint32"><a name="method-giodataoutputstream--put-uint32"></a><h3>gio.DataOutputStream.put_uint32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint32.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_uint32</code>() method puts an unsigned 32-bit integer into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.put_uint64"><a name="method-giodataoutputstream--put-uint64"></a><h3>gio.DataOutputStream.put_uint64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint64.
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
<a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
object, <code class="literal">None</code> to ignore.
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
</td></tr></tbody></table><p>
The <code class="methodname">put_uint64</code>() method puts an unsigned 64-bit integer into the output stream.
</p><p>
If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation was cancelled,
the error gio.ERROR_CANCELLED will be returned.
</p></div><div class="refsect2" title="gio.DataOutputStream.set_byte_order"><a name="method-giodataoutputstream--set-byte-order"></a><h3>gio.DataOutputStream.set_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_byte_order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>order</code></strong> :</span></p></td><td>a
<a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a> to set.
</td></tr></tbody></table><p>
The <code class="methodname">set_byte_order</code>() method sets the byte order for
the given stream. All subsequent reads from the stream will be read in the given order.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.DataInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Drive</td></tr></table></div></body></html>
|