public class StreamsTools
extends java.lang.Object
| Constructor and Description |
|---|
StreamsTools() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
computeSHADigest(java.io.File inputFile)
Compute the SHA digest for a file
|
static void |
copyStream(java.io.InputStream inputStreamToCopy,
java.io.OutputStream outputStream)
Copy a stream, the input stream is fully read but not closed
|
static java.lang.String |
fullyReadUTF8StringFromStream(java.io.InputStream s)
Read the stream in an UTF8 string
|
static void |
fullyWriteUTF8StringIntoStream(java.lang.String string,
java.io.OutputStream s)
Write a string into the stream
|
static void |
recurseDelete(java.io.File f)
recusively delete folders and the file inside ...
|
public static void copyStream(java.io.InputStream inputStreamToCopy,
java.io.OutputStream outputStream)
throws java.io.IOException
inputStreamToCopy - outputStream - java.io.IOExceptionpublic static void recurseDelete(java.io.File f)
f - public static java.lang.String fullyReadUTF8StringFromStream(java.io.InputStream s)
throws java.io.IOException
s - java.lang.Exceptionjava.io.IOExceptionpublic static void fullyWriteUTF8StringIntoStream(java.lang.String string,
java.io.OutputStream s)
throws java.io.IOException
string - s - java.io.IOExceptionpublic static byte[] computeSHADigest(java.io.File inputFile)
throws java.lang.Exception
inputFile - java.lang.Exception