Interface BufferSource

    • Method Detail

      • allocateBuffer

        java.nio.ByteBuffer allocateBuffer​(int size)
        Allocates a buffer of the given size.

        If a suitable buffer cannot be allocated then null should be returned. Implementations may place restrictions on the valid size value they will accept.

        Parameters:
        size - required buffer size
        Returns:
        a buffer of the required size