Class ByteBufferFactory
java.lang.Object
com.sun.xml.ws.transport.tcp.util.ByteBufferFactory
Class was copied from GlassFish Grizzly sources to be available
also for client side and don't require GlassFish to be installed
Factory class used to create views of a
ByteBuffer
.
The ByteBuffer can by direct or not.- Author:
- Jean-Francois Arcand
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
The default capacity of theByteBuffer
from which views will be created.static int
The default capacity of the default view of aByteBuffer
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBuffer
allocateView
(boolean direct) Return a directByteBuffer
view using the default size.static ByteBuffer
allocateView
(int size, boolean direct) Return a directByteBuffer
view
-
Field Details
-
defaultCapacity
public static int defaultCapacityThe default capacity of the default view of aByteBuffer
-
capacity
public static int capacityThe default capacity of theByteBuffer
from which views will be created.
-
-
Method Details
-
allocateView
Return a directByteBuffer
view- Parameters:
size
- the Size of theByteBuffer
-
allocateView
Return a directByteBuffer
view using the default size.
-