Exemplo n.º 1
0
        public void CompositeDirectBuffer(bool preferDirect)
        {
            IByteBufferAllocator allocator = this.NewAllocator(preferDirect);
            CompositeByteBuffer  buffer    = allocator.CompositeDirectBuffer();

            try
            {
                this.AssertCompositeByteBuffer(buffer, this.DefaultMaxComponents);
            }
            finally
            {
                buffer.Release();
            }
        }
Exemplo n.º 2
0
        public void CompositeDirectBufferWithCapacity(bool preferDirect, int maxNumComponents)
        {
            IByteBufferAllocator allocator = this.NewAllocator(preferDirect);
            CompositeByteBuffer  buffer    = allocator.CompositeDirectBuffer(maxNumComponents);

            try
            {
                this.AssertCompositeByteBuffer(buffer, maxNumComponents);
            }
            finally
            {
                buffer.Release();
            }
        }
Exemplo n.º 3
0
 public CompositeByteBuffer CompositeDirectBuffer() => _allocator.CompositeDirectBuffer();