public class ByteArrayPool extends java.lang.Object implements ByteArrayFactory
ByteArrays, using a pool to reduce allocation where possible.
WARNING: This code has never been run!| 构造器和说明 |
|---|
ByteArrayPool(boolean direct,
int maxFreeBuffers,
int maxFreeMemory)
Creates a new instance of ByteArrayPool.
|
public ByteArrayPool(boolean direct,
int maxFreeBuffers,
int maxFreeMemory)
direct - If we should use direct buffersmaxFreeBuffers - The maximum number of free buffersmaxFreeMemory - The maximum amount of free memory allowedpublic ByteArray create(int size)
ByteArraycreate 在接口中 ByteArrayFactorysize - The size of the array to buildpublic void free()