public ByteBuffer getBuffer ( ) { ByteBuffer buf = buffers . pollFirst ( ) ; if ( buf != null ) { buf . clear ( ) ; return buf ; } return ByteBuffer . wrap ( new byte [ bufferSize ] ) ; }
Get a buffer .