## org.exist.util
Class CharArrayPool

    java.lang.Object
      org.exist.util.CharArrayPool

public class CharArrayPool
extends java.lang.Object

A pool for char arrays. This pool is used by class XMLString. Whenever an XMLString needs to reallocate the backing char[], the old array is released into the pool. However, only char[] with length < MAX are kept in the pool. Larger char[] are rarely reused. The pool is bound to the current thread.

Field Summary
`static int` `MAX`
`static int` `POOL_SIZE`
`static java.lang.ThreadLocal` `pools_`

Constructor Summary
`CharArrayPool()`

Method Summary
`static char[]` `getCharArray(int size)`
`static void` `releaseCharArray(char[] b)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### POOL_SIZE

    public static final int POOL_SIZE

See Also:
  Constant Field Values

### MAX

    public static final int MAX

See Also:
  Constant Field Values

### pools_

    public static final java.lang.ThreadLocal pools_

Constructor Detail

### CharArrayPool

    public CharArrayPool()

Method Detail

### getCharArray

    public static char[] getCharArray(int size)

### releaseCharArray

    public static void releaseCharArray(char[] b)

Copyright (C) Wolfgang Meier. All rights reserved.