public class StreamUtils
extends java.lang.Object
Constructor and Description |
---|
StreamUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
closeSilently(java.io.Closeable stream)
Closes a stream, without throwing IOException.
|
static void |
copyStream(java.io.InputStream input,
java.io.OutputStream output)
Copy an input stream's contents into an output stream.
|
static java.lang.String |
readStreamAsString(java.io.InputStream stream) |
static java.lang.String |
readStreamAsString(java.io.InputStream stream,
boolean includeEndOfLines) |
public static void closeSilently(java.io.Closeable stream)
stream
- the stream that will be closedpublic static void copyStream(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static java.lang.String readStreamAsString(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
public static java.lang.String readStreamAsString(java.io.InputStream stream, boolean includeEndOfLines) throws java.io.IOException
java.io.IOException