Top Description Methods
com.github.luben.zstd

public Interface BufferPool

Known Direct Implementers
com.github.luben.zstd.NoPool, com.github.luben.zstd.RecyclingBufferPool
Imports
java.nio.ByteBuffer

An interface that allows users to customize how buffers are recycled.

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer

Returns:

a heap buffer with size at least the `capacity` and arrayOffset of 0
get
(int
the desired size of the buffer
capacity
)

Fetch a buffer from the pool.

public void
release(ByteBuffer
the buffer to return
buffer
)

Return a buffer to the pool.

Method Detail

getback to summary
public ByteBuffer get(int capacity)

Fetch a buffer from the pool.

Parameters
capacity:int

the desired size of the buffer

Returns:ByteBuffer

a heap buffer with size at least the `capacity` and arrayOffset of 0

releaseback to summary
public void release(ByteBuffer buffer)

Return a buffer to the pool.

Parameters
buffer:ByteBuffer

the buffer to return