Class HeapBufferSource

  • All Implemented Interfaces:
    BufferSource

    public class HeapBufferSource
    extends java.lang.Object
    implements BufferSource
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer allocateBuffer​(int size)
      Allocates a buffer of the given size.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HeapBufferSource

        public HeapBufferSource()
    • Method Detail

      • allocateBuffer

        public java.nio.ByteBuffer allocateBuffer​(int size)
        Description copied from interface: BufferSource
        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.

        Specified by:
        allocateBuffer in interface BufferSource
        Parameters:
        size - required buffer size
        Returns:
        a buffer of the required size
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object