Interface LeasedCharBuffer
- All Superinterfaces:
AutoCloseable
A
CharBuffer leased from a BufferAllocator.-
Method Details
-
get
CharBuffer get()Gets the leased char buffer.
Continued use of a closed char buffer can result in data corruption.
- Returns:
- the leased char buffer
- Throws:
IllegalStateException- ifclose()has already been called
-
close
void close()Returns the leased char buffer to the buffer allocator it was obtained from.
Subsequent calls to this method have no effect. Calling
get()after calling this method will throwIllegalStateException.- Specified by:
closein interfaceAutoCloseable
-