Package com.amazonaws.test.util
Class InputStreamUtils
java.lang.Object
com.amazonaws.test.util.InputStreamUtils
-
Constructor Summary
Constructors -
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
-
Constructor Details
-
InputStreamUtils
public InputStreamUtils()
-
-
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:
NoSuchAlgorithmException
IOException
-
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
-