ByteBufferAllocator


@UnstableApi
interface ByteBufferAllocator


A memory allocator for ByteBuffer.

Summary

Constants

const ByteBufferAllocator!

Default implementation.

Public functions

ByteBuffer!
allocate(capacity: Int)

Allocates and returns a new ByteBuffer.

Constants

DEFAULT

const val DEFAULTByteBufferAllocator!

Default implementation.

Public functions

allocate

fun allocate(capacity: Int): ByteBuffer!

Allocates and returns a new ByteBuffer.

Parameters
capacity: Int

The new buffer's capacity, in bytes.

Throws
java.lang.IllegalArgumentException

If the capacity is a negative integer.