autodoc.git
/
traditional_manual
/
chapter_9.html
version
»
Context lines:
10
20
40
80
file
none
3
autodoc.git/traditional_manual/chapter_9.html:6210:
<dt class='head--doc'>See also</dt> <dd class='body--doc'><p><code>sprintf</code>, <code>add_int8</code>, <code>add_int16</code>, <code>add_int32</code>, <code>add_int</code> and <code>add_hstring</code></p> </dd></dl> <hr /> <dl class='group--doc'> <dt class='head--type'><span class='homogen--type'>Method</span>
+
<span class='homogen--name'><b>add_hint</b></span>
+
</dt>
+
<dd><p><code><code class='object unresolved'>IOBuffer</code> <b><span class='method'>add_hint</span>(</b><code class='datatype'>int</code> <code class='argument'>i</code>, <code class='datatype'>int(0..)</code> <code class='argument'>size_width</code><b>)</b></code></p></dd>
+
+
<dt class='head--doc'>Description</dt>
+
<dd class='body--doc'><p>First add the size of the integer when encoded to base 256 as a
+
<code>size_width</code> integer, then add the integer to the buffer, both
+
in network byte order.</p>
+
<p> <code>size_width</code> must be less than Int.NATIVE_MAX.</p>
+
</dd></dl>
+
+
+
<hr />
+
<dl class='group--doc'>
+
<dt class='head--type'><span class='homogen--type'>Method</span>
<span class='homogen--name'><b>add_hstring</b></span> </dt> <dd><p><code><code class='object unresolved'>IOBuffer</code> <b><span class='method'>add_hstring</span>(</b><code class='datatype'>string(8bit)</code> <code class='argument'>data</code>, <code class='datatype'>int</code> <code class='argument'>size_size</code><b>)</b></code><br> <code><code class='object unresolved'>IOBuffer</code> <b><span class='method'>add_hstring</span>(</b><code class='object unresolved'>Stdio.IOBuffer</code> <code class='argument'>data</code>, <code class='datatype'>int</code> <code class='argument'>size_size</code><b>)</b></code><br> <code><code class='object unresolved'>IOBuffer</code> <b><span class='method'>add_hstring</span>(</b><code class='object unresolved'>System.Memory</code> <code class='argument'>data</code>, <code class='datatype'>int</code> <code class='argument'>size_size</code><b>)</b></code><br> <code><code class='object unresolved'>IOBuffer</code> <b><span class='method'>add_hstring</span>(</b><code class='object unresolved'>String.Buffer</code> <code class='argument'>data</code>, <code class='datatype'>int</code> <code class='argument'>size_size</code><b>)</b></code><br> <code><code class='object unresolved'>IOBuffer</code> <b><span class='method'>add_hstring</span>(</b><code class='datatype'>array</code> <code class='argument'>data</code>, <code class='datatype'>int</code> <code class='argument'>size_size</code><b>)</b></code></p></dd> <dt class='head--doc'>Description</dt> <dd class='body--doc'><p>Adds length of data followed by <code>data</code> to the buffer.</p>
autodoc.git/traditional_manual/chapter_9.html:6602:
should be parsed before the next whatever is extracted from the buffer, but do take care.</p> <p> If you need to unlink the new buffer after it has been created, call <code>trim</code> in it.</p> </dd></dl> <hr /> <dl class='group--doc'> <dt class='head--type'><span class='homogen--type'>Method</span>
+
<span class='homogen--name'><b>read_hint</b></span>
+
</dt>
+
<dd><p><code><code class='datatype'>int</code> <b><span class='method'>read_hint</span>(</b><code class='datatype'>int</code> <code class='argument'>n</code><b>)</b></code></p></dd>
+
+
<dt class='head--doc'>Description</dt>
+
<dd class='body--doc'><p>Read a network byte order unsigned number of size n*8 bits, then
+
read another network byte order number of the size indicated by
+
the first size.</p>
+
<p> Will return -1 if there is not enough buffer space available
+
unless error mode is set to throw errors.</p>
+
</dd></dl>
+
+
+
<hr />
+
<dl class='group--doc'>
+
<dt class='head--type'><span class='homogen--type'>Method</span>
<span class='homogen--name'><b>read_hstring</b></span> </dt> <dd><p><code><code class='datatype'>string(8bit)</code> <b><span class='method'>read_hstring</span>(</b><code class='datatype'>int(0..)</code> <code class='argument'>n</code><b>)</b></code></p></dd> <dt class='head--doc'>Description</dt> <dd class='body--doc'><p>Identical in functionality to <code>read</code>(<code>read_number</code>(<code>n</code>)) but faster.</p> <p> Read a network byte order number of size n*8 bits, then return the indicated number of bytes as a string.</p> <p> If there is not enough data available return 0.</p>