code: public void cleanup() {
          state = null;
          if (headerBuffer != null) {
              bufferPool.deallocate(headerBuffer);
          }
          if (dataBuffer != null) {
              bufferPool.deallocate(dataBuffer);
          }
      }
docs: De-allocates all buffers. This method should be called iff the reader isn't used anymore, i.e. when its
  connection is severed.