public @Nullable InputStream getInputStream() {
    if (mInputStreamSupplier != null) {
      return mInputStreamSupplier.get();
    }
    CloseableReference<PooledByteBuffer> pooledByteBufferRef =
        CloseableReference.cloneOrNull(mPooledByteBufferRef);
    if (pooledByteBufferRef != null) {
      try {
        return new PooledByteBufferInputStream(pooledByteBufferRef.get());
      } finally {
        CloseableReference.closeSafely(pooledByteBufferRef);
      }
    }
    return null;
  }
Returns an InputStream from the internal InputStream Supplier if it's not null. Otherwise
returns an InputStream for the internal buffer reference if valid and null otherwise.

<p>The caller has to close the InputStream after using it.
imagepipeline-base/src/main/java/com/facebook/imagepipeline/image/EncodedImage.java