⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gbufferedinputstream.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</p><p>On error -1 is returned and <em class="parameter"><code>error</code></em> is set accordingly.</p><p>For the asynchronous, non-blocking, version of this function, see <a class="link" href="GBufferedInputStream.html#g-buffered-input-stream-fill-async"><code class="function">g_buffered_input_stream_fill_async()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>stream</code></em>&#160;:</span></p></td><td> <a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream"><span class="type">GBufferedInputStream</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>count</code></em>&#160;:</span></p></td><td> the number of bytes that will be read from the stream.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em>&#160;:</span></p></td><td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td><td> location to store the error occuring, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the number of bytes read into <em class="parameter"><code>stream</code></em>'s buffer, up to <em class="parameter"><code>count</code></em>,     or -1 on error.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3199310"></a><h3><a name="g-buffered-input-stream-fill-async"></a>g_buffered_input_stream_fill_async ()</h3><a class="indexterm" name="id3199324"></a><pre class="programlisting">void                g_buffered_input_stream_fill_async  (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize">gssize</a> count,                                                         int io_priority,                                                         <a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,                                                         <a class="link" href="GAsyncResult.html#GAsyncReadyCallback">GAsyncReadyCallback</a> callback,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre><p>Reads data into <em class="parameter"><code>stream</code></em>'s buffer asynchronously, up to <em class="parameter"><code>count</code></em> size.<em class="parameter"><code>io_priority</code></em> can be used to prioritize reads. For the synchronousversion of this function, see <a class="link" href="GBufferedInputStream.html#g-buffered-input-stream-fill"><code class="function">g_buffered_input_stream_fill()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>stream</code></em>&#160;:</span></p></td><td> <a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream"><span class="type">GBufferedInputStream</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>count</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em>&#160;:</span></p></td><td> the <a class="link" href="gio-GIOScheduler.html#io-priority">I/O priority</a>     of the request.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em>&#160;:</span></p></td><td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em>&#160;:</span></p></td><td> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3199551"></a><h3><a name="g-buffered-input-stream-fill-finish"></a>g_buffered_input_stream_fill_finish ()</h3><a class="indexterm" name="id3199565"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize">gssize</a>              g_buffered_input_stream_fill_finish (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream,                                                         <a class="link" href="GAsyncResult.html" title="GAsyncResult">GAsyncResult</a> *result,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Finishes an asynchronous read.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>stream</code></em>&#160;:</span></p></td><td> a <a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream"><span class="type">GBufferedInputStream</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></p></td><td> a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> of the read stream, or <code class="literal">-1</code> on an error. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3199705"></a><h3><a name="g-buffered-input-stream-read-byte"></a>g_buffered_input_stream_read_byte ()</h3><a class="indexterm" name="id3199719"></a><pre class="programlisting">int                 g_buffered_input_stream_read_byte   (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream,                                                         <a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Tries to read a single byte from the stream or the buffer. Will blockduring this read.</p><p>On success, the byte read from the stream is returned. On end of stream-1 is returned but it's not an exceptional error and <em class="parameter"><code>error</code></em> is not set.</p><p>If <em class="parameter"><code>cancellable</code></em> is not <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled bytriggering the cancellable object from another thread. If the operationwas cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be returned. If anoperation was partially finished when the operation was cancelled thepartial result will be returned, without an error.</p><p>On error -1 is returned and <em class="parameter"><code>error</code></em> is set accordingly.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>stream</code></em>&#160;:</span></p></td><td> <a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream"><span class="type">GBufferedInputStream</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em>&#160;:</span></p></td><td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td><td> location to store the error occuring, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the byte read from the <em class="parameter"><code>stream</code></em>, or -1 on end of stream or error.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3199917"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3199928"></a><h3><a name="GBufferedInputStream--buffer-size"></a>The <code class="literal">"buffer-size"</code> property</h3><a class="indexterm" name="id3199944"></a><pre class="programlisting">  "buffer-size"              <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a>                 : Read / Write / Construct</pre><p>The size of the backend buffer.</p><p>Allowed values: &gt;= 1</p><p>Default value: 4096</p></div></div><div class="refsect1" lang="en"><a name="id3199975"></a><h2>See Also</h2><a class="link" href="GFilterInputStream.html" title="GFilterInputStream"><span class="type">GFilterInputStream</span></a>, <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a></div><div class="refsect1" lang="en"><a name="id3199997"></a><div class="refsect2" lang="en"><a name="id3199998"></a></div><hr><div class="refsect2" lang="en"><a name="id3199999"></a></div></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -