|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.util.ByteBufferFactory
public class ByteBufferFactory
Factory class used to create ByteBuffer.
The ByteBuffer can by direct (ByteBufferType.DIRECT) or heap (ByteBufferType.HEAP)
a view (ByteBufferType.DIRECT_VIEW) or ByteBufferType.HEAP_VIEW)
or backed by an array (ByteBufferType.HEAP_ARRAY).
| Nested Class Summary | |
|---|---|
static class |
ByteBufferFactory.ByteBufferType
An enumeration of all type of ByteBuffer this object can create. |
| Field Summary | |
|---|---|
static int |
capacity
The default capacity of the ByteBuffer from which views
will be created. |
static int |
defaultCapacity
The default capacity of the default view of a ByteBuffer |
| Method Summary | |
|---|---|
static ByteBuffer |
allocate(ByteBufferFactory.ByteBufferType type,
int size)
Return a new ByteBuffer based on the requested ByteBufferType |
static ByteBuffer |
allocateView(boolean direct)
Return a direct ByteBuffer view using the default size. |
static ByteBuffer |
allocateView(int size,
boolean direct)
Return a direct ByteBuffer view |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int defaultCapacity
ByteBuffer
public static int capacity
ByteBuffer from which views
will be created.
| Method Detail |
|---|
public static ByteBuffer allocateView(int size,
boolean direct)
ByteBuffer view
size - the Size of the ByteBufferdirect - - direct or non-direct buffer?
ByteBufferpublic static ByteBuffer allocateView(boolean direct)
ByteBuffer view using the default size.
direct - - direct or non-direct buffer
ByteBuffer
public static ByteBuffer allocate(ByteBufferFactory.ByteBufferType type,
int size)
ByteBufferType
type - the requested ByteBufferTypesize - the ByteBuffer size.
ByteBufferType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||