• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_10-ea) on Sun Jul 14 20:03:24 PDT 2013 -->
6<title>BufferRecycler (Jackson JSON Processor)</title>
7<meta name="date" content="2013-07-14">
8<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
9</head>
10<body>
11<script type="text/javascript"><!--
12    if (location.href.indexOf('is-external=true') == -1) {
13        parent.document.title="BufferRecycler (Jackson JSON Processor)";
14    }
15//-->
16</script>
17<noscript>
18<div>JavaScript is disabled on your browser.</div>
19</noscript>
20<!-- ========= START OF TOP NAVBAR ======= -->
21<div class="topNav"><a name="navbar_top">
22<!--   -->
23</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
24<!--   -->
25</a>
26<ul class="navList" title="Navigation">
27<li><a href="../../../../overview-summary.html">Overview</a></li>
28<li><a href="package-summary.html">Package</a></li>
29<li class="navBarCell1Rev">Class</li>
30<li><a href="class-use/BufferRecycler.html">Use</a></li>
31<li><a href="package-tree.html">Tree</a></li>
32<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
33<li><a href="../../../../index-all.html">Index</a></li>
34<li><a href="../../../../help-doc.html">Help</a></li>
35</ul>
36</div>
37<div class="subNav">
38<ul class="navList">
39<li>Prev Class</li>
40<li><a href="../../../../org/codehaus/jackson/util/BufferRecycler.ByteBufferType.html" title="enum in org.codehaus.jackson.util"><span class="strong">Next Class</span></a></li>
41</ul>
42<ul class="navList">
43<li><a href="../../../../index.html?org/codehaus/jackson/util/BufferRecycler.html" target="_top">Frames</a></li>
44<li><a href="BufferRecycler.html" target="_top">No Frames</a></li>
45</ul>
46<ul class="navList" id="allclasses_navbar_top">
47<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
48</ul>
49<div>
50<script type="text/javascript"><!--
51  allClassesLink = document.getElementById("allclasses_navbar_top");
52  if(window==top) {
53    allClassesLink.style.display = "block";
54  }
55  else {
56    allClassesLink.style.display = "none";
57  }
58  //-->
59</script>
60</div>
61<div>
62<ul class="subNavList">
63<li>Summary:&nbsp;</li>
64<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
65<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
66<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
67<li><a href="#method_summary">Method</a></li>
68</ul>
69<ul class="subNavList">
70<li>Detail:&nbsp;</li>
71<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
72<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
73<li><a href="#method_detail">Method</a></li>
74</ul>
75</div>
76<a name="skip-navbar_top">
77<!--   -->
78</a></div>
79<!-- ========= END OF TOP NAVBAR ========= -->
80<!-- ======== START OF CLASS DATA ======== -->
81<div class="header">
82<div class="subTitle">org.codehaus.jackson.util</div>
83<h2 title="Class BufferRecycler" class="title">Class BufferRecycler</h2>
84</div>
85<div class="contentContainer">
86<ul class="inheritance">
87<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>
88<li>
89<ul class="inheritance">
90<li>org.codehaus.jackson.util.BufferRecycler</li>
91</ul>
92</li>
93</ul>
94<div class="description">
95<ul class="blockList">
96<li class="blockList">
97<hr>
98<br>
99<pre>public class <span class="strong">BufferRecycler</span>
100extends <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>
101<div class="block">This is a small utility class, whose main functionality is to allow
102 simple reuse of raw byte/char buffers. It is usually used through
103 <code>ThreadLocal</code> member of the owning class pointing to
104 instance of this class through a <code>SoftReference</code>. The
105 end result is a low-overhead GC-cleanable recycling: hopefully
106 ideal for use by stream readers.</div>
107</li>
108</ul>
109</div>
110<div class="summary">
111<ul class="blockList">
112<li class="blockList">
113<!-- ======== NESTED CLASS SUMMARY ======== -->
114<ul class="blockList">
115<li class="blockList"><a name="nested_class_summary">
116<!--   -->
117</a>
118<h3>Nested Class Summary</h3>
119<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
120<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
121<tr>
122<th class="colFirst" scope="col">Modifier and Type</th>
123<th class="colLast" scope="col">Class and Description</th>
124</tr>
125<tr class="altColor">
126<td class="colFirst"><code>static class&nbsp;</code></td>
127<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.ByteBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.ByteBufferType</a></strong></code>&nbsp;</td>
128</tr>
129<tr class="rowColor">
130<td class="colFirst"><code>static class&nbsp;</code></td>
131<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.CharBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.CharBufferType</a></strong></code>&nbsp;</td>
132</tr>
133</table>
134</li>
135</ul>
136<!-- =========== FIELD SUMMARY =========== -->
137<ul class="blockList">
138<li class="blockList"><a name="field_summary">
139<!--   -->
140</a>
141<h3>Field Summary</h3>
142<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
143<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
144<tr>
145<th class="colFirst" scope="col">Modifier and Type</th>
146<th class="colLast" scope="col">Field and Description</th>
147</tr>
148<tr class="altColor">
149<td class="colFirst"><code>protected byte[][]</code></td>
150<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#_byteBuffers">_byteBuffers</a></strong></code>&nbsp;</td>
151</tr>
152<tr class="rowColor">
153<td class="colFirst"><code>protected char[][]</code></td>
154<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#_charBuffers">_charBuffers</a></strong></code>&nbsp;</td>
155</tr>
156<tr class="altColor">
157<td class="colFirst"><code>static int</code></td>
158<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#DEFAULT_WRITE_CONCAT_BUFFER_LEN">DEFAULT_WRITE_CONCAT_BUFFER_LEN</a></strong></code>&nbsp;</td>
159</tr>
160</table>
161</li>
162</ul>
163<!-- ======== CONSTRUCTOR SUMMARY ======== -->
164<ul class="blockList">
165<li class="blockList"><a name="constructor_summary">
166<!--   -->
167</a>
168<h3>Constructor Summary</h3>
169<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
170<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
171<tr>
172<th class="colOne" scope="col">Constructor and Description</th>
173</tr>
174<tr class="altColor">
175<td class="colOne"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#BufferRecycler()">BufferRecycler</a></strong>()</code>&nbsp;</td>
176</tr>
177</table>
178</li>
179</ul>
180<!-- ========== METHOD SUMMARY =========== -->
181<ul class="blockList">
182<li class="blockList"><a name="method_summary">
183<!--   -->
184</a>
185<h3>Method Summary</h3>
186<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
187<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
188<tr>
189<th class="colFirst" scope="col">Modifier and Type</th>
190<th class="colLast" scope="col">Method and Description</th>
191</tr>
192<tr class="altColor">
193<td class="colFirst"><code>byte[]</code></td>
194<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#allocByteBuffer(org.codehaus.jackson.util.BufferRecycler.ByteBufferType)">allocByteBuffer</a></strong>(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.ByteBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.ByteBufferType</a>&nbsp;type)</code>&nbsp;</td>
195</tr>
196<tr class="rowColor">
197<td class="colFirst"><code>char[]</code></td>
198<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#allocCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType)">allocCharBuffer</a></strong>(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.CharBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.CharBufferType</a>&nbsp;type)</code>&nbsp;</td>
199</tr>
200<tr class="altColor">
201<td class="colFirst"><code>char[]</code></td>
202<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#allocCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType, int)">allocCharBuffer</a></strong>(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.CharBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.CharBufferType</a>&nbsp;type,
203               int&nbsp;minSize)</code>&nbsp;</td>
204</tr>
205<tr class="rowColor">
206<td class="colFirst"><code>void</code></td>
207<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#releaseByteBuffer(org.codehaus.jackson.util.BufferRecycler.ByteBufferType, byte[])">releaseByteBuffer</a></strong>(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.ByteBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.ByteBufferType</a>&nbsp;type,
208                 byte[]&nbsp;buffer)</code>&nbsp;</td>
209</tr>
210<tr class="altColor">
211<td class="colFirst"><code>void</code></td>
212<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#releaseCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType, char[])">releaseCharBuffer</a></strong>(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.CharBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.CharBufferType</a>&nbsp;type,
213                 char[]&nbsp;buffer)</code>&nbsp;</td>
214</tr>
215</table>
216<ul class="blockList">
217<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
218<!--   -->
219</a>
220<h3>Methods inherited from class&nbsp;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>
221<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>
222</ul>
223</li>
224</ul>
225</li>
226</ul>
227</div>
228<div class="details">
229<ul class="blockList">
230<li class="blockList">
231<!-- ============ FIELD DETAIL =========== -->
232<ul class="blockList">
233<li class="blockList"><a name="field_detail">
234<!--   -->
235</a>
236<h3>Field Detail</h3>
237<a name="DEFAULT_WRITE_CONCAT_BUFFER_LEN">
238<!--   -->
239</a>
240<ul class="blockList">
241<li class="blockList">
242<h4>DEFAULT_WRITE_CONCAT_BUFFER_LEN</h4>
243<pre>public static final&nbsp;int DEFAULT_WRITE_CONCAT_BUFFER_LEN</pre>
244<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.codehaus.jackson.util.BufferRecycler.DEFAULT_WRITE_CONCAT_BUFFER_LEN">Constant Field Values</a></dd></dl>
245</li>
246</ul>
247<a name="_byteBuffers">
248<!--   -->
249</a>
250<ul class="blockList">
251<li class="blockList">
252<h4>_byteBuffers</h4>
253<pre>protected final&nbsp;byte[][] _byteBuffers</pre>
254</li>
255</ul>
256<a name="_charBuffers">
257<!--   -->
258</a>
259<ul class="blockListLast">
260<li class="blockList">
261<h4>_charBuffers</h4>
262<pre>protected final&nbsp;char[][] _charBuffers</pre>
263</li>
264</ul>
265</li>
266</ul>
267<!-- ========= CONSTRUCTOR DETAIL ======== -->
268<ul class="blockList">
269<li class="blockList"><a name="constructor_detail">
270<!--   -->
271</a>
272<h3>Constructor Detail</h3>
273<a name="BufferRecycler()">
274<!--   -->
275</a>
276<ul class="blockListLast">
277<li class="blockList">
278<h4>BufferRecycler</h4>
279<pre>public&nbsp;BufferRecycler()</pre>
280</li>
281</ul>
282</li>
283</ul>
284<!-- ============ METHOD DETAIL ========== -->
285<ul class="blockList">
286<li class="blockList"><a name="method_detail">
287<!--   -->
288</a>
289<h3>Method Detail</h3>
290<a name="allocByteBuffer(org.codehaus.jackson.util.BufferRecycler.ByteBufferType)">
291<!--   -->
292</a>
293<ul class="blockList">
294<li class="blockList">
295<h4>allocByteBuffer</h4>
296<pre>public final&nbsp;byte[]&nbsp;allocByteBuffer(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.ByteBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.ByteBufferType</a>&nbsp;type)</pre>
297</li>
298</ul>
299<a name="releaseByteBuffer(org.codehaus.jackson.util.BufferRecycler.ByteBufferType, byte[])">
300<!--   -->
301</a>
302<ul class="blockList">
303<li class="blockList">
304<h4>releaseByteBuffer</h4>
305<pre>public final&nbsp;void&nbsp;releaseByteBuffer(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.ByteBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.ByteBufferType</a>&nbsp;type,
306                     byte[]&nbsp;buffer)</pre>
307</li>
308</ul>
309<a name="allocCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType)">
310<!--   -->
311</a>
312<ul class="blockList">
313<li class="blockList">
314<h4>allocCharBuffer</h4>
315<pre>public final&nbsp;char[]&nbsp;allocCharBuffer(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.CharBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.CharBufferType</a>&nbsp;type)</pre>
316</li>
317</ul>
318<a name="allocCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType, int)">
319<!--   -->
320</a>
321<ul class="blockList">
322<li class="blockList">
323<h4>allocCharBuffer</h4>
324<pre>public final&nbsp;char[]&nbsp;allocCharBuffer(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.CharBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.CharBufferType</a>&nbsp;type,
325                     int&nbsp;minSize)</pre>
326</li>
327</ul>
328<a name="releaseCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType, char[])">
329<!--   -->
330</a>
331<ul class="blockListLast">
332<li class="blockList">
333<h4>releaseCharBuffer</h4>
334<pre>public final&nbsp;void&nbsp;releaseCharBuffer(<a href="../../../../org/codehaus/jackson/util/BufferRecycler.CharBufferType.html" title="enum in org.codehaus.jackson.util">BufferRecycler.CharBufferType</a>&nbsp;type,
335                     char[]&nbsp;buffer)</pre>
336</li>
337</ul>
338</li>
339</ul>
340</li>
341</ul>
342</div>
343</div>
344<!-- ========= END OF CLASS DATA ========= -->
345<!-- ======= START OF BOTTOM NAVBAR ====== -->
346<div class="bottomNav"><a name="navbar_bottom">
347<!--   -->
348</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
349<!--   -->
350</a>
351<ul class="navList" title="Navigation">
352<li><a href="../../../../overview-summary.html">Overview</a></li>
353<li><a href="package-summary.html">Package</a></li>
354<li class="navBarCell1Rev">Class</li>
355<li><a href="class-use/BufferRecycler.html">Use</a></li>
356<li><a href="package-tree.html">Tree</a></li>
357<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
358<li><a href="../../../../index-all.html">Index</a></li>
359<li><a href="../../../../help-doc.html">Help</a></li>
360</ul>
361</div>
362<div class="subNav">
363<ul class="navList">
364<li>Prev Class</li>
365<li><a href="../../../../org/codehaus/jackson/util/BufferRecycler.ByteBufferType.html" title="enum in org.codehaus.jackson.util"><span class="strong">Next Class</span></a></li>
366</ul>
367<ul class="navList">
368<li><a href="../../../../index.html?org/codehaus/jackson/util/BufferRecycler.html" target="_top">Frames</a></li>
369<li><a href="BufferRecycler.html" target="_top">No Frames</a></li>
370</ul>
371<ul class="navList" id="allclasses_navbar_bottom">
372<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
373</ul>
374<div>
375<script type="text/javascript"><!--
376  allClassesLink = document.getElementById("allclasses_navbar_bottom");
377  if(window==top) {
378    allClassesLink.style.display = "block";
379  }
380  else {
381    allClassesLink.style.display = "none";
382  }
383  //-->
384</script>
385</div>
386<div>
387<ul class="subNavList">
388<li>Summary:&nbsp;</li>
389<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
390<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
391<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
392<li><a href="#method_summary">Method</a></li>
393</ul>
394<ul class="subNavList">
395<li>Detail:&nbsp;</li>
396<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
397<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
398<li><a href="#method_detail">Method</a></li>
399</ul>
400</div>
401<a name="skip-navbar_bottom">
402<!--   -->
403</a></div>
404<!-- ======== END OF BOTTOM NAVBAR ======= -->
405</body>
406</html>
407