gov.nasa.worldwind.util
Class BufferFactory.ByteBufferFactory
java.lang.Object
gov.nasa.worldwind.util.BufferFactory
gov.nasa.worldwind.util.BufferFactory.ByteBufferFactory
- Enclosing class:
- BufferFactory
public static class BufferFactory.ByteBufferFactory
- extends BufferFactory
Implementation of BufferFactory which constructs instances of BufferWrapper.ByteBufferWrapper
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferFactory.ByteBufferFactory
public BufferFactory.ByteBufferFactory()
- Constructs a new ByteBufferFactory with the default buffer allocation policy. This factory allocates and
returns ByteBufferWrappers backed by direct buffers.
BufferFactory.ByteBufferFactory
public BufferFactory.ByteBufferFactory(boolean allocateDirect)
- Constructs a new ByteBufferFactory with the specified buffer allocation policy.
- Parameters:
allocateDirect - true to allocate and return ByteBufferWrappers backed by direct buffers, false to
allocate and return ByteufferWrappers backed by non-direct buffers.
newBuffer
public BufferWrapper newBuffer(int size)
- Constructs a new ByteBufferWrapper of the specified size, backed by a
ByteBuffer.
- Specified by:
newBuffer in class BufferFactory
- Parameters:
size - the new buffer's size, int bytes.
- Returns:
- the new buffer.
- Throws:
IllegalArgumentException - if size is negative.