public synchronized void releaseBuffer() throws IOException {
    if (byteArrayOutputStream.isPresent()) {
      byteArrayOutputStream.get().close();
      byteArrayOutputStream = Optional.empty();
      LOG.info("Internal buffer has been released for blob " + blobAsyncClient.getBlobUrl().toString()
          + ". Writes are no longer entertained.");
    }
  }
Releases the underlying buffer i.e; ByteArrayOutputStream.
flush must be explicitly called prior to releaseBuffer else all data written
since the beginning/previous flush will be lost.
No data can be written after releaseBuffer, flush after releaseBuffer is a no-op
and close must still be invoked to wait for all pending uploads to finish and persist the blob.
This is optional and can be used to release memory.
@throws IOException if ByteArrayOutputStream.close fails
samza-azure/src/main/java/org/apache/samza/system/azureblob/avro/AzureBlobOutputStream.java