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

📄 gbufferedinputstream.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3198427"></a><h3><a name="g-buffered-input-stream-get-buffer-size"></a>g_buffered_input_stream_get_buffer_size ()</h3><a class="indexterm" name="id3198441"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a>               g_buffered_input_stream_get_buffer_size                                                        (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream);</pre><p>Gets the size of the input buffer.</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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the current buffer size.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3198509"></a><h3><a name="g-buffered-input-stream-set-buffer-size"></a>g_buffered_input_stream_set_buffer_size ()</h3><a class="indexterm" name="id3198523"></a><pre class="programlisting">void                g_buffered_input_stream_set_buffer_size                                                        (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a> size);</pre><p>Sets the size of the internal buffer of <em class="parameter"><code>stream</code></em> to <em class="parameter"><code>size</code></em>, or to the size of the contents of the buffer. The buffer can never be resized smaller than its current contents.</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>size</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3198622"></a><h3><a name="g-buffered-input-stream-get-available"></a>g_buffered_input_stream_get_available ()</h3><a class="indexterm" name="id3198636"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a>               g_buffered_input_stream_get_available                                                        (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream);</pre><p>Gets the size of the available data within the stream.</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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> size of the available stream. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3198705"></a><h3><a name="g-buffered-input-stream-peek-buffer"></a>g_buffered_input_stream_peek_buffer ()</h3><a class="indexterm" name="id3198719"></a><pre class="programlisting">const void*         g_buffered_input_stream_peek_buffer (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a> *count);</pre><p>Returns the buffer with the currently available bytes. The returnedbuffer must not be modified and will become invalid when reading fromthe stream or filling the buffer.</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>count</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> to get the number of bytes available in the buffer.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> read-only buffer</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3198818"></a><h3><a name="g-buffered-input-stream-peek"></a>g_buffered_input_stream_peek ()</h3><a class="indexterm" name="id3198832"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a>               g_buffered_input_stream_peek        (<a class="link" href="GBufferedInputStream.html" title="GBufferedInputStream">GBufferedInputStream</a> *stream,                                                         void *buffer,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a> offset,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a> count);</pre><p>Peeks in the buffer, copying data of size <em class="parameter"><code>count</code></em> into <em class="parameter"><code>buffer</code></em>, offset <em class="parameter"><code>offset</code></em> bytes.</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>buffer</code></em>&#160;:</span></p></td><td> a pointer to an allocated chunk of memory.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</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#gsize"><span class="type">gsize</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#gsize"><span class="type">gsize</span></a> of the number of bytes peeked, or <code class="literal">-1</code> on error.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3199012"></a><h3><a name="g-buffered-input-stream-fill"></a>g_buffered_input_stream_fill ()</h3><a class="indexterm" name="id3199025"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize">gssize</a>              g_buffered_input_stream_fill        (<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,                                                         <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 <em class="parameter"><code>count</code></em> bytes from the stream into the buffer. Will block during this read.</p><p>If <em class="parameter"><code>count</code></em> is zero, returns zero and does nothing. A value of <em class="parameter"><code>count</code></em>larger than <ahref="/usr/share/gtk-doc/html/glib/glib-Limits-of-Basic-Types.html#G-MAXSSIZE:CAPS"><code class="literal">G_MAXSSIZE</code></a> will cause a <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a> error.</p><p>On success, the number of bytes read into the buffer is returned.It is not an error if this is not the same as the requested size, as itcan happen e.g. near the end of a file. Zero is returned on end of file(or if <em class="parameter"><code>count</code></em> is zero),  but never otherwise.</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.

⌨️ 快捷键说明

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