public class InputStreamUtils extends Object
Constructor and Description |
---|
InputStreamUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
calculateMD5Digest(InputStream is)
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
|
public static byte[] calculateMD5Digest(InputStream is) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmException
IOException
public static byte[] drainInputStream(InputStream inputStream)
inputStream
- InputStream to drainCopyright © 2024. All rights reserved.