Hi everyone, I'm wonder how I'd code up a ByteBuffer
recycling class that can get me a ByteBuffer
which is at least as big as the specified length, and which can lock up ByteBuffer
objects in use to prevent their use while they are being used by my code. This would prevent re-construction of DirectByteBuffers
and such over and over, instead using existing ones. Is there an existing Java library which can do this very effectively? I know Javolution can work with object recycling, but does that extend to the ByteBuffer
class in this context with the requirements set out?
Cheers,
Chris