org.openqa.jetty.util
Class ByteArrayPool
java.lang.Object
org.openqa.jetty.util.ByteArrayPool
public class ByteArrayPool
- extends java.lang.Object
Byte Array Pool
Simple pool for recycling byte arrays of a fixed size.
- Version:
- $Id: ByteArrayPool.java,v 1.9 2004/05/09 20:32:49 gregwilkins Exp $
- Author:
- Greg Wilkins (gregw)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
__POOL_SIZE
public static final int __POOL_SIZE
__pools
public static final java.lang.ThreadLocal __pools
__slot
public static int __slot
ByteArrayPool
public ByteArrayPool()
getByteArray
public static byte[] getByteArray(int size)
- Get a byte array from the pool of known size.
- Parameters:
size
- Size of the byte array.
- Returns:
- Byte array of known size.
getByteArrayAtLeast
public static byte[] getByteArrayAtLeast(int minSize)
returnByteArray
public static void returnByteArray(byte[] b)
Copyright © 2011. All Rights Reserved.