-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathclassCheckedArrayByteSink.html
More file actions
456 lines (422 loc) · 28.1 KB
/
classCheckedArrayByteSink.html
File metadata and controls
456 lines (422 loc) · 28.1 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ICU 78.1: icu::CheckedArrayByteSink Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ICU 78.1
 <span id="projectnumber">78.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceicu.html">icu</a></li><li class="navelem"><a class="el" href="classicu_1_1CheckedArrayByteSink.html">CheckedArrayByteSink</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">icu::CheckedArrayByteSink Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Implementation of <a class="el" href="classicu_1_1ByteSink.html" title="A ByteSink can be filled with bytes.">ByteSink</a> that writes to a flat byte array, with bounds-checking: This sink will not write more than capacity bytes to outbuf.
<a href="classicu_1_1CheckedArrayByteSink.html#details">More...</a></p>
<p><code>#include <<a class="el" href="bytestream_8h_source.html">bytestream.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for icu::CheckedArrayByteSink:</div>
<div class="dyncontent">
<div class="center">
<img src="classicu_1_1CheckedArrayByteSink.png" usemap="#icu::CheckedArrayByteSink_map" alt=""/>
<map id="icu::CheckedArrayByteSink_map" name="icu::CheckedArrayByteSink_map">
<area href="classicu_1_1ByteSink.html" title="A ByteSink can be filled with bytes." alt="icu::ByteSink" shape="rect" coords="0,56,167,80"/>
<area href="classicu_1_1UMemory.html" title="UMemory is the common ICU base class." alt="icu::UMemory" shape="rect" coords="0,0,167,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2ad2fd80f945eb971384e704a24a4da4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#a2ad2fd80f945eb971384e704a24a4da4">CheckedArrayByteSink</a> (char *outbuf, int32_t capacity)</td></tr>
<tr class="memdesc:a2ad2fd80f945eb971384e704a24a4da4"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a <a class="el" href="classicu_1_1ByteSink.html" title="A ByteSink can be filled with bytes.">ByteSink</a> that will write to outbuf[0..capacity-1]. <a href="classicu_1_1CheckedArrayByteSink.html#a2ad2fd80f945eb971384e704a24a4da4">More...</a><br /></td></tr>
<tr class="separator:a2ad2fd80f945eb971384e704a24a4da4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2f00ab1d8ddcd922c65449ebb435bc04"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#a2f00ab1d8ddcd922c65449ebb435bc04">~CheckedArrayByteSink</a> ()</td></tr>
<tr class="memdesc:a2f00ab1d8ddcd922c65449ebb435bc04"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classicu_1_1CheckedArrayByteSink.html#a2f00ab1d8ddcd922c65449ebb435bc04">More...</a><br /></td></tr>
<tr class="separator:a2f00ab1d8ddcd922c65449ebb435bc04"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abba65c7ce58ff4932a445660d6d6946e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1CheckedArrayByteSink.html">CheckedArrayByteSink</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#abba65c7ce58ff4932a445660d6d6946e">Reset</a> ()</td></tr>
<tr class="memdesc:abba65c7ce58ff4932a445660d6d6946e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the sink to its original state, without modifying the buffer. <a href="classicu_1_1CheckedArrayByteSink.html#abba65c7ce58ff4932a445660d6d6946e">More...</a><br /></td></tr>
<tr class="separator:abba65c7ce58ff4932a445660d6d6946e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac5b828c4a8c4d65fdca6860f02e72c89"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#ac5b828c4a8c4d65fdca6860f02e72c89">Append</a> (const char *bytes, int32_t n) override</td></tr>
<tr class="memdesc:ac5b828c4a8c4d65fdca6860f02e72c89"><td class="mdescLeft"> </td><td class="mdescRight">Append "bytes[0,n-1]" to this. <a href="classicu_1_1CheckedArrayByteSink.html#ac5b828c4a8c4d65fdca6860f02e72c89">More...</a><br /></td></tr>
<tr class="separator:ac5b828c4a8c4d65fdca6860f02e72c89"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a16eb07406d3b1c68989025e7f136aa2d"><td class="memItemLeft" align="right" valign="top">virtual char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#a16eb07406d3b1c68989025e7f136aa2d">GetAppendBuffer</a> (int32_t min_capacity, int32_t desired_capacity_hint, char *scratch, int32_t scratch_capacity, int32_t *result_capacity) override</td></tr>
<tr class="memdesc:a16eb07406d3b1c68989025e7f136aa2d"><td class="mdescLeft"> </td><td class="mdescRight">Returns a writable buffer for appending and writes the buffer's capacity to *result_capacity. <a href="classicu_1_1CheckedArrayByteSink.html#a16eb07406d3b1c68989025e7f136aa2d">More...</a><br /></td></tr>
<tr class="separator:a16eb07406d3b1c68989025e7f136aa2d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0e10087229f4a410e759822fcfa89edb"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#a0e10087229f4a410e759822fcfa89edb">NumberOfBytesWritten</a> () const</td></tr>
<tr class="memdesc:a0e10087229f4a410e759822fcfa89edb"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of bytes actually written to the sink. <a href="classicu_1_1CheckedArrayByteSink.html#a0e10087229f4a410e759822fcfa89edb">More...</a><br /></td></tr>
<tr class="separator:a0e10087229f4a410e759822fcfa89edb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab1b0344012dae42c91b43b553a048eac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#ab1b0344012dae42c91b43b553a048eac">Overflowed</a> () const</td></tr>
<tr class="memdesc:ab1b0344012dae42c91b43b553a048eac"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity' bytes. <a href="classicu_1_1CheckedArrayByteSink.html#ab1b0344012dae42c91b43b553a048eac">More...</a><br /></td></tr>
<tr class="separator:ab1b0344012dae42c91b43b553a048eac"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8c3c34a78801711969e3199e3a4d69de"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1CheckedArrayByteSink.html#a8c3c34a78801711969e3199e3a4d69de">NumberOfBytesAppended</a> () const</td></tr>
<tr class="memdesc:a8c3c34a78801711969e3199e3a4d69de"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of bytes appended to the sink. <a href="classicu_1_1CheckedArrayByteSink.html#a8c3c34a78801711969e3199e3a4d69de">More...</a><br /></td></tr>
<tr class="separator:a8c3c34a78801711969e3199e3a4d69de"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classicu_1_1ByteSink"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classicu_1_1ByteSink')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classicu_1_1ByteSink.html">icu::ByteSink</a></td></tr>
<tr class="memitem:ac3e9a257c1fd9e981bceb8f6981d9b6e inherit pub_methods_classicu_1_1ByteSink"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1ByteSink.html#ac3e9a257c1fd9e981bceb8f6981d9b6e">ByteSink</a> ()</td></tr>
<tr class="memdesc:ac3e9a257c1fd9e981bceb8f6981d9b6e inherit pub_methods_classicu_1_1ByteSink"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="classicu_1_1ByteSink.html#ac3e9a257c1fd9e981bceb8f6981d9b6e">More...</a><br /></td></tr>
<tr class="separator:ac3e9a257c1fd9e981bceb8f6981d9b6e inherit pub_methods_classicu_1_1ByteSink"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeea90b9a402f4446d493f7e6cc3361c0 inherit pub_methods_classicu_1_1ByteSink"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1ByteSink.html#aeea90b9a402f4446d493f7e6cc3361c0">~ByteSink</a> ()</td></tr>
<tr class="memdesc:aeea90b9a402f4446d493f7e6cc3361c0 inherit pub_methods_classicu_1_1ByteSink"><td class="mdescLeft"> </td><td class="mdescRight">Virtual destructor. <a href="classicu_1_1ByteSink.html#aeea90b9a402f4446d493f7e6cc3361c0">More...</a><br /></td></tr>
<tr class="separator:aeea90b9a402f4446d493f7e6cc3361c0 inherit pub_methods_classicu_1_1ByteSink"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2d5b62995d93a766a52651fcac809591 inherit pub_methods_classicu_1_1ByteSink"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1ByteSink.html#a2d5b62995d93a766a52651fcac809591">AppendU8</a> (const char *bytes, int32_t n)</td></tr>
<tr class="memdesc:a2d5b62995d93a766a52651fcac809591 inherit pub_methods_classicu_1_1ByteSink"><td class="mdescLeft"> </td><td class="mdescRight">Appends n bytes to this. <a href="classicu_1_1ByteSink.html#a2d5b62995d93a766a52651fcac809591">More...</a><br /></td></tr>
<tr class="separator:a2d5b62995d93a766a52651fcac809591 inherit pub_methods_classicu_1_1ByteSink"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aceeb6e6dd959bf559b7c5e656e3ba107 inherit pub_methods_classicu_1_1ByteSink"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1ByteSink.html#aceeb6e6dd959bf559b7c5e656e3ba107">AppendU8</a> (const char8_t *bytes, int32_t n)</td></tr>
<tr class="memdesc:aceeb6e6dd959bf559b7c5e656e3ba107 inherit pub_methods_classicu_1_1ByteSink"><td class="mdescLeft"> </td><td class="mdescRight">Appends n bytes to this. <a href="classicu_1_1ByteSink.html#aceeb6e6dd959bf559b7c5e656e3ba107">More...</a><br /></td></tr>
<tr class="separator:aceeb6e6dd959bf559b7c5e656e3ba107 inherit pub_methods_classicu_1_1ByteSink"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad8b12cabefa31cfcdd1dc166a9f829f2 inherit pub_methods_classicu_1_1ByteSink"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1ByteSink.html#ad8b12cabefa31cfcdd1dc166a9f829f2">Flush</a> ()</td></tr>
<tr class="memdesc:ad8b12cabefa31cfcdd1dc166a9f829f2 inherit pub_methods_classicu_1_1ByteSink"><td class="mdescLeft"> </td><td class="mdescRight">Flush internal buffers. <a href="classicu_1_1ByteSink.html#ad8b12cabefa31cfcdd1dc166a9f829f2">More...</a><br /></td></tr>
<tr class="separator:ad8b12cabefa31cfcdd1dc166a9f829f2 inherit pub_methods_classicu_1_1ByteSink"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implementation of <a class="el" href="classicu_1_1ByteSink.html" title="A ByteSink can be filled with bytes.">ByteSink</a> that writes to a flat byte array, with bounds-checking: This sink will not write more than capacity bytes to outbuf. </p>
<p>If more than capacity bytes are <a class="el" href="classicu_1_1CheckedArrayByteSink.html#ac5b828c4a8c4d65fdca6860f02e72c89" title="Append "bytes[0,n-1]" to this.">Append()</a>ed, then excess bytes are ignored, and <a class="el" href="classicu_1_1CheckedArrayByteSink.html#ab1b0344012dae42c91b43b553a048eac" title="Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity'...">Overflowed()</a> will return true. Overflow does not cause a runtime error. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000051">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<p class="definition">Definition at line <a class="el" href="bytestream_8h_source.html#l00182">182</a> of file <a class="el" href="bytestream_8h_source.html">bytestream.h</a>.</p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a2ad2fd80f945eb971384e704a24a4da4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ad2fd80f945eb971384e704a24a4da4">◆ </a></span>CheckedArrayByteSink()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">icu::CheckedArrayByteSink::CheckedArrayByteSink </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"><em>outbuf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>capacity</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classicu_1_1ByteSink.html" title="A ByteSink can be filled with bytes.">ByteSink</a> that will write to outbuf[0..capacity-1]. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">outbuf</td><td>buffer to write to </td></tr>
<tr><td class="paramname">capacity</td><td>size of the buffer </td></tr>
</table>
</dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000060">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
</div>
</div>
<a id="a2f00ab1d8ddcd922c65449ebb435bc04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f00ab1d8ddcd922c65449ebb435bc04">◆ </a></span>~CheckedArrayByteSink()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual icu::CheckedArrayByteSink::~CheckedArrayByteSink </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000061">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac5b828c4a8c4d65fdca6860f02e72c89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5b828c4a8c4d65fdca6860f02e72c89">◆ </a></span>Append()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void icu::CheckedArrayByteSink::Append </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>n</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Append "bytes[0,n-1]" to this. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bytes</td><td>the pointer to the bytes </td></tr>
<tr><td class="paramname">n</td><td>the number of bytes; must be non-negative </td></tr>
</table>
</dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000063">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<p>Implements <a class="el" href="classicu_1_1ByteSink.html#a61fe994281322e8a3e3ed2e50c910e41">icu::ByteSink</a>.</p>
</div>
</div>
<a id="a16eb07406d3b1c68989025e7f136aa2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16eb07406d3b1c68989025e7f136aa2d">◆ </a></span>GetAppendBuffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual char* icu::CheckedArrayByteSink::GetAppendBuffer </td>
<td>(</td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>min_capacity</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>desired_capacity_hint</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>scratch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>scratch_capacity</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t * </td>
<td class="paramname"><em>result_capacity</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a writable buffer for appending and writes the buffer's capacity to *result_capacity. </p>
<p>For details see the base class documentation. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">min_capacity</td><td>required minimum capacity of the returned buffer; must be non-negative </td></tr>
<tr><td class="paramname">desired_capacity_hint</td><td>desired capacity of the returned buffer; must be non-negative </td></tr>
<tr><td class="paramname">scratch</td><td>default caller-owned buffer </td></tr>
<tr><td class="paramname">scratch_capacity</td><td>capacity of the scratch buffer </td></tr>
<tr><td class="paramname">result_capacity</td><td>pointer to an integer which will be set to the capacity of the returned buffer </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a buffer with *result_capacity>=min_capacity </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000064">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<p>Reimplemented from <a class="el" href="classicu_1_1ByteSink.html#a391838e3698a0132097ff2877565aaee">icu::ByteSink</a>.</p>
</div>
</div>
<a id="a8c3c34a78801711969e3199e3a4d69de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c3c34a78801711969e3199e3a4d69de">◆ </a></span>NumberOfBytesAppended()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int32_t icu::CheckedArrayByteSink::NumberOfBytesAppended </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of bytes appended to the sink. </p>
<p>If <a class="el" href="classicu_1_1CheckedArrayByteSink.html#ab1b0344012dae42c91b43b553a048eac" title="Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity'...">Overflowed()</a> then <a class="el" href="classicu_1_1CheckedArrayByteSink.html#a8c3c34a78801711969e3199e3a4d69de" title="Returns the number of bytes appended to the sink.">NumberOfBytesAppended()</a>><a class="el" href="classicu_1_1CheckedArrayByteSink.html#a0e10087229f4a410e759822fcfa89edb" title="Returns the number of bytes actually written to the sink.">NumberOfBytesWritten()</a> else they return the same number. </p><dl class="section return"><dt>Returns</dt><dd>number of bytes written to the buffer </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000067">Stable:</a></b></dt><dd>ICU 4.6 </dd></dl>
<p class="definition">Definition at line <a class="el" href="bytestream_8h_source.html#l00250">250</a> of file <a class="el" href="bytestream_8h_source.html">bytestream.h</a>.</p>
</div>
</div>
<a id="a0e10087229f4a410e759822fcfa89edb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e10087229f4a410e759822fcfa89edb">◆ </a></span>NumberOfBytesWritten()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int32_t icu::CheckedArrayByteSink::NumberOfBytesWritten </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of bytes actually written to the sink. </p>
<dl class="section return"><dt>Returns</dt><dd>number of bytes written to the buffer </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000065">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<p class="definition">Definition at line <a class="el" href="bytestream_8h_source.html#l00235">235</a> of file <a class="el" href="bytestream_8h_source.html">bytestream.h</a>.</p>
</div>
</div>
<a id="ab1b0344012dae42c91b43b553a048eac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1b0344012dae42c91b43b553a048eac">◆ </a></span>Overflowed()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::CheckedArrayByteSink::Overflowed </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity' bytes. </p>
<dl class="section return"><dt>Returns</dt><dd>true if more than 'capacity' bytes were <a class="el" href="classicu_1_1CheckedArrayByteSink.html#ac5b828c4a8c4d65fdca6860f02e72c89" title="Append "bytes[0,n-1]" to this.">Append()</a>ed </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000066">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<p class="definition">Definition at line <a class="el" href="bytestream_8h_source.html#l00242">242</a> of file <a class="el" href="bytestream_8h_source.html">bytestream.h</a>.</p>
</div>
</div>
<a id="abba65c7ce58ff4932a445660d6d6946e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abba65c7ce58ff4932a445660d6d6946e">◆ </a></span>Reset()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classicu_1_1CheckedArrayByteSink.html">CheckedArrayByteSink</a>& icu::CheckedArrayByteSink::Reset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the sink to its original state, without modifying the buffer. </p>
<p>Useful for reusing both the buffer and the sink for multiple streams. Resets the state to <a class="el" href="classicu_1_1CheckedArrayByteSink.html#a0e10087229f4a410e759822fcfa89edb" title="Returns the number of bytes actually written to the sink.">NumberOfBytesWritten()</a>=<a class="el" href="classicu_1_1CheckedArrayByteSink.html#a8c3c34a78801711969e3199e3a4d69de" title="Returns the number of bytes appended to the sink.">NumberOfBytesAppended()</a>=0 and <a class="el" href="classicu_1_1CheckedArrayByteSink.html#ab1b0344012dae42c91b43b553a048eac" title="Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity'...">Overflowed()</a>=false. </p><dl class="section return"><dt>Returns</dt><dd>*this </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000062">Stable:</a></b></dt><dd>ICU 4.6 </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>common/unicode/<a class="el" href="bytestream_8h_source.html">bytestream.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>