|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.util.byteaccess.ByteArrayPool
public class ByteArrayPool
Creates ByteArrays, using a pool to reduce allocation where possible.
WARNING: This code has never been run!
| Constructor Summary | |
|---|---|
ByteArrayPool(boolean direct,
int maxFreeBuffers,
int maxFreeMemory)
Creates a new instance of ByteArrayPool. |
|
| Method Summary | |
|---|---|
ByteArray |
create(int size)
Creates a new instance of a ByteArray |
void |
free()
Frees the buffers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 allowed| Method Detail |
|---|
public ByteArray create(int size)
ByteArray
create in interface ByteArrayFactorysize - The size of the array to build
public void free()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||