private void disposeBuffer() {
      if (bufferWrapper != null && cacheBuffer) {
        if (isSharedBuffer) {
          isSharedBuffer = false;
        }
        else {
          bufferWrapper.unlock();
        }
      }
      bufferWrapper = null;
    }
private void disposeBuffer()