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