Class BufferFactory.ShortBufferFactory

    • Constructor Detail

      • ShortBufferFactory

        public ShortBufferFactory​(boolean allocateDirect)
        Constructs a new ShortBufferFactory with the specified buffer allocation policy.
        Parameters:
        allocateDirect - true to allocate and return ShortBufferWrappers backed by direct buffers, false to allocate and return ShortBufferWrappers backed by non-direct buffers.
      • ShortBufferFactory

        public ShortBufferFactory()
        Constructs a new ShortBufferFactory with the default buffer allocation policy. This factory allocates and returns ShortBufferWrappers backed by direct buffers.
    • Method Detail

      • newBuffer

        public BufferWrapper newBuffer​(int size)
        Constructs a new ShortBufferWrapper of the specified size, backed by a ShortBuffer.
        Specified by:
        newBuffer in class BufferFactory
        Parameters:
        size - the new buffer's size, int shorts.
        Returns:
        the new buffer.
        Throws:
        java.lang.IllegalArgumentException - if size is negative.