static void release ( BufferPool . Buffer buff ) throws IOException { if ( buff . buf . length == staticConf . getSmallBufferSize ( ) ) { smallBufferPool . put ( buff ) ; } else if ( buff . buf . length == staticConf . getMediumBufferSize ( ) ) { mediumBufferPool . put ( buff ) ; } else if ( buff . buf . length == staticConf . getLargeBufferSize ( ) ) { largeBufferPool . put ( buff ) ; } }
Release a buffer back to the pool . MUST be called to gain the benefit of pooling .