public class IOUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(java.io.Closeable is,
org.slf4j.Logger log)
Closes the given Closeable quietly.
|
static byte[] |
toByteArray(java.io.InputStream is)
Reads and returns the rest of the given input stream as a byte array.
|
static java.lang.String |
toString(java.io.InputStream is)
Reads and returns the rest of the given input stream as a string.
|
public static byte[] toByteArray(java.io.InputStream is)
throws java.io.IOException
is - an InputStreamjava.io.IOException - If there were any problems reading from the streampublic static java.lang.String toString(java.io.InputStream is)
throws java.io.IOException
is - an InputStreamjava.io.IOException - If there were any problems reading from the streampublic static void closeQuietly(java.io.Closeable is,
org.slf4j.Logger log)
is - the given closeablelog - logger used to log any failure should the close fail