<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_10-ea) on Sun Jul 14 20:03:24 PDT 2013 -->
<title>BufferRecycler (Jackson JSON Processor)</title>
<meta name="date" content="2013-07-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="BufferRecycler (Jackson JSON Processor)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BufferRecycler.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<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>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/codehaus/jackson/util/BufferRecycler.html" target="_top">Frames</a></li>
<li><a href="BufferRecycler.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.codehaus.jackson.util</div>
<h2 title="Class BufferRecycler" class="title">Class BufferRecycler</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<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>
<li>
<ul class="inheritance">
<li>org.codehaus.jackson.util.BufferRecycler</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">BufferRecycler</span>
extends <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>
<div class="block">This is a small utility class, whose main functionality is to allow
 simple reuse of raw byte/char buffers. It is usually used through
 <code>ThreadLocal</code> member of the owning class pointing to
 instance of this class through a <code>SoftReference</code>. The
 end result is a low-overhead GC-cleanable recycling: hopefully
 ideal for use by stream readers.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<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>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<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>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected byte[][]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#_byteBuffers">_byteBuffers</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected char[][]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#_charBuffers">_charBuffers</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<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>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/codehaus/jackson/util/BufferRecycler.html#BufferRecycler()">BufferRecycler</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<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>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>char[]</code></td>
<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>
</tr>
<tr class="altColor">
<td class="colFirst"><code>char[]</code></td>
<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,
               int&nbsp;minSize)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<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,
                 byte[]&nbsp;buffer)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<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,
                 char[]&nbsp;buffer)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<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>
<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>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_WRITE_CONCAT_BUFFER_LEN">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_WRITE_CONCAT_BUFFER_LEN</h4>
<pre>public static final&nbsp;int DEFAULT_WRITE_CONCAT_BUFFER_LEN</pre>
<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>
</li>
</ul>
<a name="_byteBuffers">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_byteBuffers</h4>
<pre>protected final&nbsp;byte[][] _byteBuffers</pre>
</li>
</ul>
<a name="_charBuffers">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>_charBuffers</h4>
<pre>protected final&nbsp;char[][] _charBuffers</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="BufferRecycler()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BufferRecycler</h4>
<pre>public&nbsp;BufferRecycler()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="allocByteBuffer(org.codehaus.jackson.util.BufferRecycler.ByteBufferType)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocByteBuffer</h4>
<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>
</li>
</ul>
<a name="releaseByteBuffer(org.codehaus.jackson.util.BufferRecycler.ByteBufferType, byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>releaseByteBuffer</h4>
<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,
                     byte[]&nbsp;buffer)</pre>
</li>
</ul>
<a name="allocCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocCharBuffer</h4>
<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>
</li>
</ul>
<a name="allocCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocCharBuffer</h4>
<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,
                     int&nbsp;minSize)</pre>
</li>
</ul>
<a name="releaseCharBuffer(org.codehaus.jackson.util.BufferRecycler.CharBufferType, char[])">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>releaseCharBuffer</h4>
<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,
                     char[]&nbsp;buffer)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BufferRecycler.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<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>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/codehaus/jackson/util/BufferRecycler.html" target="_top">Frames</a></li>
<li><a href="BufferRecycler.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>