public class ByteArrayPool extends Object
Modifier and Type | Field and Description |
---|---|
static int |
__POOL_SIZE |
static ThreadLocal |
__pools |
static int |
__slot |
Constructor and Description |
---|
ByteArrayPool() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
getByteArray(int size)
Get a byte array from the pool of known size.
|
static byte[] |
getByteArrayAtLeast(int minSize) |
static void |
returnByteArray(byte[] b) |
public static final int __POOL_SIZE
public static final ThreadLocal __pools
public static int __slot
public static byte[] getByteArray(int size)
size
- Size of the byte array.public static byte[] getByteArrayAtLeast(int minSize)
public static void returnByteArray(byte[] b)
Copyright © 2013. All Rights Reserved.