public class ByteBufferThreadLocal extends ThreadLocal<ByteBuffer>
ByteBufferand makes thread-local copies of it.
Note that this class only works with
ByteBuffer, not the related
primitive buffers. This is because the
duplicte() method is
defined on the concrete classes, not the
Because each thread will have its own
ByteBuffer instance, the
mark, position and limit of those buffers will vary independently. Application
code should never assume that one thread's buffer is in the same state as
another (except for contents).
|Modifier and Type||Method and Description|