public static class BufferFactory.IntBufferFactory extends BufferFactory
BufferWrapper.IntBufferWrapper
BufferFactory.ByteBufferFactory, BufferFactory.DoubleBufferFactory, BufferFactory.FloatBufferFactory, BufferFactory.IntBufferFactory, BufferFactory.ShortBufferFactory
Constructor and Description |
---|
IntBufferFactory()
Constructs a new IntBufferFactory with the default buffer allocation policy.
|
IntBufferFactory(boolean allocateDirect)
Constructs a new IntBufferFactory with the specified buffer allocation policy.
|
Modifier and Type | Method and Description |
---|---|
BufferWrapper |
newBuffer(int size)
Constructs a new IntBufferWrapper of the specified size, backed by a
IntBuffer . |
isAllocateDirect
public IntBufferFactory()
public IntBufferFactory(boolean allocateDirect)
allocateDirect
- true to allocate and return IntBufferWrappers backed by direct buffers, false to
allocate and return IntBufferWrappers backed by non-direct buffers.public BufferWrapper newBuffer(int size)
IntBuffer
.newBuffer
in class BufferFactory
size
- the new buffer's size, int ints.java.lang.IllegalArgumentException
- if size is negative.