@Override
  public synchronized long getNativePtr() throws UnsupportedOperationException {
    ensureValid();
    Preconditions.checkNotNull(mBufRef);
    return mBufRef.get().getNativePtr();
  }
Gets the size of the ByteBuffer if it is valid. Otherwise, an exception is raised

@return the size of the ByteBuffer if it is not closed.
@throws {@link ClosedException}
imagepipeline/src/main/java/com/facebook/imagepipeline/memory/MemoryPooledByteBuffer.java