|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Allocator
The 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.
| Method Summary | |
|---|---|
Buffer |
allocate()
This method is used to allocate a default buffer. |
Buffer |
allocate(long size)
This method is used to allocate a default buffer. |
void |
close()
This method is used to close the allocator so that resources that are occupied by the allocator can be freed. |
| Method Detail |
|---|
Buffer allocate()
throws IOException
IOException
Buffer allocate(long size)
throws IOException
size - this is the initial capacity the buffer should have
IOException
void close()
throws IOException
close in interface CloseableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||