|
|||||||||
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(int 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 java.io.IOException
java.io.IOException
Buffer allocate(int size) throws java.io.IOException
size
- this is the initial capacity the buffer should have
java.io.IOException
void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |