private void sendFinalResultToConsumer(PooledByteBufferOutputStream pooledOutputStream) {
      CloseableReference<PooledByteBuffer> result =
          CloseableReference.of(pooledOutputStream.toByteBuffer());
      EncodedImage encodedImage = null;
      try {
        encodedImage = new EncodedImage(result);
        encodedImage.parseMetaData();
        getConsumer().onNewResult(encodedImage, IS_LAST);
      } finally {
        EncodedImage.closeSafely(encodedImage);
        CloseableReference.closeSafely(result);
      }
    }
Consumer that consumes results from next producer in the sequence.

<p>If the consumer receives a partial result, it caches it on disk with an appropriate key to
differentiate from the full image.

<p>If a partial image is already held, it combines new results with that partial data and
passes the combination to the next consumer.
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/PartialDiskCacheProducer.java