public void release ( final byte [ ] buffer ) { if ( buffer == null ) { return ; } final int capacity = buffer . length ; if ( capacity == 0 ) { return ; } synchronized ( lock ) { List < Object > bList = buffers . get ( capacity ) ; if ( bList == null ) { bList = new LinkedList < Object > ( ) ; buffers . put ( capacity , bList ) ; } bList . add ( buffer ) ; usedBuffersCount -- ; } }
Recycle the buffer .