1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<!-- Generated by javadoc (version 1.7.0_25) on Sat Nov 16 21:43:20 PST 2013 --> 6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> 7<title>ObjectBuffer (jackson-databind 2.3.0 API)</title> 8<meta name="date" content="2013-11-16"> 9<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> 10</head> 11<body> 12<script type="text/javascript"><!-- 13 if (location.href.indexOf('is-external=true') == -1) { 14 parent.document.title="ObjectBuffer (jackson-databind 2.3.0 API)"; 15 } 16//--> 17</script> 18<noscript> 19<div>JavaScript is disabled on your browser.</div> 20</noscript> 21<!-- ========= START OF TOP NAVBAR ======= --> 22<div class="topNav"><a name="navbar_top"> 23<!-- --> 24</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 25<!-- --> 26</a> 27<ul class="navList" title="Navigation"> 28<li><a href="../../../../../overview-summary.html">Overview</a></li> 29<li><a href="package-summary.html">Package</a></li> 30<li class="navBarCell1Rev">Class</li> 31<li><a href="class-use/ObjectBuffer.html">Use</a></li> 32<li><a href="package-tree.html">Tree</a></li> 33<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> 34<li><a href="../../../../../index-all.html">Index</a></li> 35<li><a href="../../../../../help-doc.html">Help</a></li> 36</ul> 37</div> 38<div class="subNav"> 39<ul class="navList"> 40<li><a href="../../../../../com/fasterxml/jackson/databind/util/NameTransformer.Chained.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Prev Class</span></a></li> 41<li><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectIdMap.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Next Class</span></a></li> 42</ul> 43<ul class="navList"> 44<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/util/ObjectBuffer.html" target="_top">Frames</a></li> 45<li><a href="ObjectBuffer.html" target="_top">No Frames</a></li> 46</ul> 47<ul class="navList" id="allclasses_navbar_top"> 48<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> 49</ul> 50<div> 51<script type="text/javascript"><!-- 52 allClassesLink = document.getElementById("allclasses_navbar_top"); 53 if(window==top) { 54 allClassesLink.style.display = "block"; 55 } 56 else { 57 allClassesLink.style.display = "none"; 58 } 59 //--> 60</script> 61</div> 62<div> 63<ul class="subNavList"> 64<li>Summary: </li> 65<li>Nested | </li> 66<li>Field | </li> 67<li><a href="#constructor_summary">Constr</a> | </li> 68<li><a href="#method_summary">Method</a></li> 69</ul> 70<ul class="subNavList"> 71<li>Detail: </li> 72<li>Field | </li> 73<li><a href="#constructor_detail">Constr</a> | </li> 74<li><a href="#method_detail">Method</a></li> 75</ul> 76</div> 77<a name="skip-navbar_top"> 78<!-- --> 79</a></div> 80<!-- ========= END OF TOP NAVBAR ========= --> 81<!-- ======== START OF CLASS DATA ======== --> 82<div class="header"> 83<div class="subTitle">com.fasterxml.jackson.databind.util</div> 84<h2 title="Class ObjectBuffer" class="title">Class ObjectBuffer</h2> 85</div> 86<div class="contentContainer"> 87<ul class="inheritance"> 88<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> 89<li> 90<ul class="inheritance"> 91<li>com.fasterxml.jackson.databind.util.ObjectBuffer</li> 92</ul> 93</li> 94</ul> 95<div class="description"> 96<ul class="blockList"> 97<li class="blockList"> 98<hr> 99<br> 100<pre>public final class <span class="strong">ObjectBuffer</span> 101extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> 102<div class="block">Helper class to use for constructing Object arrays by appending entries 103 to create arrays of various lengths (length that is not known a priori).</div> 104</li> 105</ul> 106</div> 107<div class="summary"> 108<ul class="blockList"> 109<li class="blockList"> 110<!-- ======== CONSTRUCTOR SUMMARY ======== --> 111<ul class="blockList"> 112<li class="blockList"><a name="constructor_summary"> 113<!-- --> 114</a> 115<h3>Constructor Summary</h3> 116<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 117<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 118<tr> 119<th class="colOne" scope="col">Constructor and Description</th> 120</tr> 121<tr class="altColor"> 122<td class="colOne"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#ObjectBuffer()">ObjectBuffer</a></strong>()</code> </td> 123</tr> 124</table> 125</li> 126</ul> 127<!-- ========== METHOD SUMMARY =========== --> 128<ul class="blockList"> 129<li class="blockList"><a name="method_summary"> 130<!-- --> 131</a> 132<h3>Method Summary</h3> 133<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 134<caption><span>Methods</span><span class="tabEnd"> </span></caption> 135<tr> 136<th class="colFirst" scope="col">Modifier and Type</th> 137<th class="colLast" scope="col">Method and Description</th> 138</tr> 139<tr class="altColor"> 140<td class="colFirst"><code>protected void</code></td> 141<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#_copyTo(java.lang.Object, int, java.lang.Object[], int)">_copyTo</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> resultArray, 142 int totalSize, 143 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 144 int lastChunkEntries)</code> </td> 145</tr> 146<tr class="rowColor"> 147<td class="colFirst"><code>protected void</code></td> 148<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#_reset()">_reset</a></strong>()</code> </td> 149</tr> 150<tr class="altColor"> 151<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]</code></td> 152<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#appendCompletedChunk(java.lang.Object[])">appendCompletedChunk</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] fullChunk)</code> 153<div class="block">Method called to add a full Object array as a chunk buffered within 154 this buffer, and to obtain a new array to fill.</div> 155</td> 156</tr> 157<tr class="rowColor"> 158<td class="colFirst"><code>int</code></td> 159<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#bufferedSize()">bufferedSize</a></strong>()</code> 160<div class="block">Method that can be used to check how many Objects have been buffered 161 within this buffer.</div> 162</td> 163</tr> 164<tr class="altColor"> 165<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]</code></td> 166<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#completeAndClearBuffer(java.lang.Object[], int)">completeAndClearBuffer</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 167 int lastChunkEntries)</code> 168<div class="block">Method called to indicate that the buffering process is now 169 complete; and to construct a combined exactly-sized result 170 array.</div> 171</td> 172</tr> 173<tr class="rowColor"> 174<td class="colFirst"><code><T> T[]</code></td> 175<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#completeAndClearBuffer(java.lang.Object[], int, java.lang.Class)">completeAndClearBuffer</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 176 int lastChunkEntries, 177 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> componentType)</code> 178<div class="block">Type-safe alternative to 179 <a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#completeAndClearBuffer(java.lang.Object[], int)"><code>completeAndClearBuffer(Object[], int)</code></a>, to allow 180 for constructing explicitly typed result array.</div> 181</td> 182</tr> 183<tr class="altColor"> 184<td class="colFirst"><code>void</code></td> 185<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#completeAndClearBuffer(java.lang.Object[], int, java.util.List)">completeAndClearBuffer</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 186 int lastChunkEntries, 187 <a href="http://docs.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> resultList)</code> </td> 188</tr> 189<tr class="rowColor"> 190<td class="colFirst"><code>int</code></td> 191<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#initialCapacity()">initialCapacity</a></strong>()</code> 192<div class="block">Helper method that can be used to check how much free capacity 193 will this instance start with.</div> 194</td> 195</tr> 196<tr class="altColor"> 197<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]</code></td> 198<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#resetAndStart()">resetAndStart</a></strong>()</code> 199<div class="block">Method called to start buffering process.</div> 200</td> 201</tr> 202</table> 203<ul class="blockList"> 204<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 205<!-- --> 206</a> 207<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 208<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> 209</ul> 210</li> 211</ul> 212</li> 213</ul> 214</div> 215<div class="details"> 216<ul class="blockList"> 217<li class="blockList"> 218<!-- ========= CONSTRUCTOR DETAIL ======== --> 219<ul class="blockList"> 220<li class="blockList"><a name="constructor_detail"> 221<!-- --> 222</a> 223<h3>Constructor Detail</h3> 224<a name="ObjectBuffer()"> 225<!-- --> 226</a> 227<ul class="blockListLast"> 228<li class="blockList"> 229<h4>ObjectBuffer</h4> 230<pre>public ObjectBuffer()</pre> 231</li> 232</ul> 233</li> 234</ul> 235<!-- ============ METHOD DETAIL ========== --> 236<ul class="blockList"> 237<li class="blockList"><a name="method_detail"> 238<!-- --> 239</a> 240<h3>Method Detail</h3> 241<a name="resetAndStart()"> 242<!-- --> 243</a> 244<ul class="blockList"> 245<li class="blockList"> 246<h4>resetAndStart</h4> 247<pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] resetAndStart()</pre> 248<div class="block">Method called to start buffering process. Will ensure that the buffer 249 is empty, and then return an object array to start chunking content on</div> 250</li> 251</ul> 252<a name="appendCompletedChunk(java.lang.Object[])"> 253<!-- --> 254</a> 255<ul class="blockList"> 256<li class="blockList"> 257<h4>appendCompletedChunk</h4> 258<pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] appendCompletedChunk(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] fullChunk)</pre> 259<div class="block">Method called to add a full Object array as a chunk buffered within 260 this buffer, and to obtain a new array to fill. Caller is not to use 261 the array it gives; but to use the returned array for continued 262 buffering.</div> 263<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fullChunk</code> - Completed chunk that the caller is requesting 264 to append to this buffer. It is generally chunk that was 265 returned by an earlier call to <a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#resetAndStart()"><code>resetAndStart()</code></a> or 266 <a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#appendCompletedChunk(java.lang.Object[])"><code>appendCompletedChunk(java.lang.Object[])</code></a> (although this is not required or 267 enforced)</dd> 268<dt><span class="strong">Returns:</span></dt><dd>New chunk buffer for caller to fill</dd></dl> 269</li> 270</ul> 271<a name="completeAndClearBuffer(java.lang.Object[], int)"> 272<!-- --> 273</a> 274<ul class="blockList"> 275<li class="blockList"> 276<h4>completeAndClearBuffer</h4> 277<pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] completeAndClearBuffer(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 278 int lastChunkEntries)</pre> 279<div class="block">Method called to indicate that the buffering process is now 280 complete; and to construct a combined exactly-sized result 281 array. Additionally the buffer itself will be reset to 282 reduce memory retention. 283<p> 284 Resulting array will be of generic <code>Object[]</code> type: 285 if a typed array is needed, use the method with additional 286 type argument.</div> 287</li> 288</ul> 289<a name="completeAndClearBuffer(java.lang.Object[], int, java.lang.Class)"> 290<!-- --> 291</a> 292<ul class="blockList"> 293<li class="blockList"> 294<h4>completeAndClearBuffer</h4> 295<pre>public <T> T[] completeAndClearBuffer(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 296 int lastChunkEntries, 297 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> componentType)</pre> 298<div class="block">Type-safe alternative to 299 <a href="../../../../../com/fasterxml/jackson/databind/util/ObjectBuffer.html#completeAndClearBuffer(java.lang.Object[], int)"><code>completeAndClearBuffer(Object[], int)</code></a>, to allow 300 for constructing explicitly typed result array.</div> 301<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentType</code> - Type of elements included in the buffer. Will be 302 used for constructing the result array.</dd></dl> 303</li> 304</ul> 305<a name="completeAndClearBuffer(java.lang.Object[], int, java.util.List)"> 306<!-- --> 307</a> 308<ul class="blockList"> 309<li class="blockList"> 310<h4>completeAndClearBuffer</h4> 311<pre>public void completeAndClearBuffer(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 312 int lastChunkEntries, 313 <a href="http://docs.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> resultList)</pre> 314</li> 315</ul> 316<a name="initialCapacity()"> 317<!-- --> 318</a> 319<ul class="blockList"> 320<li class="blockList"> 321<h4>initialCapacity</h4> 322<pre>public int initialCapacity()</pre> 323<div class="block">Helper method that can be used to check how much free capacity 324 will this instance start with. Can be used to choose the best 325 instance to reuse, based on size of reusable object chunk 326 buffer holds reference to.</div> 327</li> 328</ul> 329<a name="bufferedSize()"> 330<!-- --> 331</a> 332<ul class="blockList"> 333<li class="blockList"> 334<h4>bufferedSize</h4> 335<pre>public int bufferedSize()</pre> 336<div class="block">Method that can be used to check how many Objects have been buffered 337 within this buffer.</div> 338</li> 339</ul> 340<a name="_reset()"> 341<!-- --> 342</a> 343<ul class="blockList"> 344<li class="blockList"> 345<h4>_reset</h4> 346<pre>protected void _reset()</pre> 347</li> 348</ul> 349<a name="_copyTo(java.lang.Object, int, java.lang.Object[], int)"> 350<!-- --> 351</a> 352<ul class="blockListLast"> 353<li class="blockList"> 354<h4>_copyTo</h4> 355<pre>protected final void _copyTo(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> resultArray, 356 int totalSize, 357 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] lastChunk, 358 int lastChunkEntries)</pre> 359</li> 360</ul> 361</li> 362</ul> 363</li> 364</ul> 365</div> 366</div> 367<!-- ========= END OF CLASS DATA ========= --> 368<!-- ======= START OF BOTTOM NAVBAR ====== --> 369<div class="bottomNav"><a name="navbar_bottom"> 370<!-- --> 371</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 372<!-- --> 373</a> 374<ul class="navList" title="Navigation"> 375<li><a href="../../../../../overview-summary.html">Overview</a></li> 376<li><a href="package-summary.html">Package</a></li> 377<li class="navBarCell1Rev">Class</li> 378<li><a href="class-use/ObjectBuffer.html">Use</a></li> 379<li><a href="package-tree.html">Tree</a></li> 380<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> 381<li><a href="../../../../../index-all.html">Index</a></li> 382<li><a href="../../../../../help-doc.html">Help</a></li> 383</ul> 384</div> 385<div class="subNav"> 386<ul class="navList"> 387<li><a href="../../../../../com/fasterxml/jackson/databind/util/NameTransformer.Chained.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Prev Class</span></a></li> 388<li><a href="../../../../../com/fasterxml/jackson/databind/util/ObjectIdMap.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Next Class</span></a></li> 389</ul> 390<ul class="navList"> 391<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/util/ObjectBuffer.html" target="_top">Frames</a></li> 392<li><a href="ObjectBuffer.html" target="_top">No Frames</a></li> 393</ul> 394<ul class="navList" id="allclasses_navbar_bottom"> 395<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> 396</ul> 397<div> 398<script type="text/javascript"><!-- 399 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 400 if(window==top) { 401 allClassesLink.style.display = "block"; 402 } 403 else { 404 allClassesLink.style.display = "none"; 405 } 406 //--> 407</script> 408</div> 409<div> 410<ul class="subNavList"> 411<li>Summary: </li> 412<li>Nested | </li> 413<li>Field | </li> 414<li><a href="#constructor_summary">Constr</a> | </li> 415<li><a href="#method_summary">Method</a></li> 416</ul> 417<ul class="subNavList"> 418<li>Detail: </li> 419<li>Field | </li> 420<li><a href="#constructor_detail">Constr</a> | </li> 421<li><a href="#method_detail">Method</a></li> 422</ul> 423</div> 424<a name="skip-navbar_bottom"> 425<!-- --> 426</a></div> 427<!-- ======== END OF BOTTOM NAVBAR ======= --> 428<p class="legalCopy"><small>Copyright © 2012-2013 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> 429</body> 430</html> 431