Class ByteBufferFactory
- java.lang.Object
-
- com.sun.xml.ws.transport.tcp.util.ByteBufferFactory
-
public final class ByteBufferFactory extends Object
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 aByteBuffer. The ByteBuffer can by direct or not.- Author:
- Jean-Francois Arcand
-
-
Field Summary
Fields Modifier and Type Field Description static intcapacityThe default capacity of theByteBufferfrom which views will be created.static intdefaultCapacityThe default capacity of the default view of aByteBuffer
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ByteBufferallocateView(boolean direct)Return a directByteBufferview using the default size.static ByteBufferallocateView(int size, boolean direct)Return a directByteBufferview
-
-
-
Method Detail
-
allocateView
public static ByteBuffer allocateView(int size, boolean direct)
Return a directByteBufferview- Parameters:
size- the Size of theByteBuffer
-
allocateView
public static ByteBuffer allocateView(boolean direct)
Return a directByteBufferview using the default size.
-
-