|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.netseeker.ejoe.cache.ByteBufferAllocator
public class ByteBufferAllocator
Utility supporting safe allocations and caching of ByteBuffers.
| Constructor Summary | |
|---|---|
ByteBufferAllocator()
|
|
| Method Summary | |
|---|---|
static java.nio.ByteBuffer |
allocate(int size)
Allocates either a direct or a indirect ByteBuffer. |
static java.nio.ByteBuffer |
allocate(int size,
boolean direct)
Allocates either a direct or a indirect ByteBuffer. |
static void |
collect(java.nio.ByteBuffer buffer)
Tries to clear and destroy a existing ByteBuffer |
static java.nio.ByteBuffer |
reAllocate(java.nio.ByteBuffer src,
int newSize)
Resizes a given ByteBuffer to a new size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteBufferAllocator()
| Method Detail |
|---|
public static java.nio.ByteBuffer allocate(int size,
boolean direct)
size - target size of the requested new ByteBufferdirect -
public static java.nio.ByteBuffer allocate(int size)
size - target size of the requested new ByteBuffersize -
public static java.nio.ByteBuffer reAllocate(java.nio.ByteBuffer src,
int newSize)
src - ByteBuffer to get resizednewSize - size in bytes for the resized bufferpublic static void collect(java.nio.ByteBuffer buffer)
buffer -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||