public class ByteArrayPool extends java.lang.Object implements ByteArrayFactory
ByteArray
s, 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)
ByteArray
create
在接口中 ByteArrayFactory
size
- The size of the array to buildpublic void free()