Package software.amazon.awssdk.testutils
Class InputStreamUtils
java.lang.Object
software.amazon.awssdk.testutils.InputStreamUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Calculates the MD5 digest for the given input stream and returns it.static byte[]drainInputStream(InputStream inputStream) Reads to the end of the inputStream returning a byte array of the contents
-
Method Details
-
calculateMD5Digest
public static byte[] calculateMD5Digest(InputStream is) throws NoSuchAlgorithmException, IOException Calculates the MD5 digest for the given input stream and returns it.- Throws:
NoSuchAlgorithmExceptionIOException
-
drainInputStream
Reads to the end of the inputStream returning a byte array of the contents- Parameters:
inputStream- InputStream to drain- Returns:
- Remaining data in stream as a byte array
-