public class InputStreamUtils
extends java.lang.Object
Constructor and Description |
---|
InputStreamUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
calculateMD5Digest(java.io.InputStream is)
Calculates the MD5 digest for the given input stream and returns it.
|
static byte[] |
drainInputStream(java.io.InputStream inputStream)
Reads to the end of the inputStream returning a byte array of the contents
|
public static byte[] calculateMD5Digest(java.io.InputStream is) throws java.security.NoSuchAlgorithmException, java.io.IOException
java.security.NoSuchAlgorithmException
java.io.IOException
public static byte[] drainInputStream(java.io.InputStream inputStream)
inputStream
- InputStream to drain