public interface Allocator
Allocator
interface is used to describe a resource
that can allocate a buffer. This is used so that memory allocation
can be implemented as a strategy allowing many different sources of
memory. Typically memory will be allocated as an array of bytes but
can be a mapped region of shared memory or a file.Modifier and Type | Method and Description |
---|---|
Buffer |
allocate()
This method is used to allocate a default buffer.
|
Buffer |
allocate(long size)
This method is used to allocate a default buffer.
|
Buffer allocate() throws IOException
IOException
Buffer allocate(long size) throws IOException
size
- this is the initial capacity the buffer should haveIOException
Copyright © 2017. All rights reserved.