public final class StreamUtils
extends java.lang.Object
| Constructor and Description |
|---|
StreamUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
readToEnd(java.io.InputStream stream,
java.nio.charset.Charset charset)
Reads the provided stream until the end and returns a string encoded with the provided charset.
|
public static java.lang.String readToEnd(java.io.InputStream stream,
java.nio.charset.Charset charset)
throws java.io.IOException
stream - the stream to readcharset - the charset to usejava.lang.NullPointerException - if stream or charset is nulljava.io.IOException - if an I/O error occurs