@Override
  public int size() {
    return isClosed() ? -1 : mBuffer.capacity();
  }
A trivial implementation of {@link PooledByteBuffer} using {@link ByteBuffer}
imagepipeline-base-test/src/main/java/com/facebook/imagepipeline/testing/TrivialBufferPooledByteBuffer.java