|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BufferHandle
A handle to a ByteBuffer
Method Summary | |
---|---|
ByteBuffer |
getBuffer()
Get a byte buffer of reasonable size, the buffer will have been cleared. |
ByteBuffer |
getLargeBuffer()
Get a byte buffer of reasonable size, the buffer will have been cleared. |
boolean |
isEmpty()
Check if this handle is empty, that is if no buffer exists or the buffer is empty. |
boolean |
isLarge(ByteBuffer buffer)
Check if the given buffer is a large buffer |
void |
possiblyFlush()
release a buffer if possible. |
void |
setMayBeFlushed(boolean mayBeFlushed)
Flag that the internal ByteBuffer may not be flushed. |
Method Detail |
---|
boolean isEmpty()
ByteBuffer getBuffer()
ByteBuffer getLargeBuffer()
boolean isLarge(ByteBuffer buffer)
buffer
- the ByteBuffer to check
void possiblyFlush()
void setMayBeFlushed(boolean mayBeFlushed)
mayBeFlushed
- if true the buffer may be returned,
if false the putBuffer call will throw an exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |