@Test void CompressAndStream_NullBlob_IllegalArgumentException() throws IOException { try (InputStream stream = new FileInputStream(testFilePath)) { assertThrows( IllegalArgumentException.class, () -> azureStorageClient.compressAndUploadStream(stream, null)); } }
void compressAndUploadStream(InputStream inputStream, CloudBlockBlob blob) throws StorageException, IOException { Ensure.argIsNotNull(inputStream, "inputStream"); Ensure.argIsNotNull(blob, "blob"); BlobOutputStream bos = blob.openOutputStream(); GZIPOutputStream gzout = new GZIPOutputStream(bos); copyStream(inputStream, gzout, GZIP_BUFFER_SIZE); gzout.close(); }
AzureStorageClient { void compressAndUploadStream(InputStream inputStream, CloudBlockBlob blob) throws StorageException, IOException { Ensure.argIsNotNull(inputStream, "inputStream"); Ensure.argIsNotNull(blob, "blob"); BlobOutputStream bos = blob.openOutputStream(); GZIPOutputStream gzout = new GZIPOutputStream(bos); copyStream(inputStream, gzout, GZIP_BUFFER_SIZE); gzout.close(); } }
AzureStorageClient { void compressAndUploadStream(InputStream inputStream, CloudBlockBlob blob) throws StorageException, IOException { Ensure.argIsNotNull(inputStream, "inputStream"); Ensure.argIsNotNull(blob, "blob"); BlobOutputStream bos = blob.openOutputStream(); GZIPOutputStream gzout = new GZIPOutputStream(bos); copyStream(inputStream, gzout, GZIP_BUFFER_SIZE); gzout.close(); }  }
AzureStorageClient { void compressAndUploadStream(InputStream inputStream, CloudBlockBlob blob) throws StorageException, IOException { Ensure.argIsNotNull(inputStream, "inputStream"); Ensure.argIsNotNull(blob, "blob"); BlobOutputStream bos = blob.openOutputStream(); GZIPOutputStream gzout = new GZIPOutputStream(bos); copyStream(inputStream, gzout, GZIP_BUFFER_SIZE); gzout.close(); }   }
AzureStorageClient { void compressAndUploadStream(InputStream inputStream, CloudBlockBlob blob) throws StorageException, IOException { Ensure.argIsNotNull(inputStream, "inputStream"); Ensure.argIsNotNull(blob, "blob"); BlobOutputStream bos = blob.openOutputStream(); GZIPOutputStream gzout = new GZIPOutputStream(bos); copyStream(inputStream, gzout, GZIP_BUFFER_SIZE); gzout.close(); }    }