public final class IOUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Charset |
UTF8
UTF-8 character set.
|
Modifier and Type | Method and Description |
---|---|
static void |
closeQuietly(Closeable resource)
Unconditionally close a
Closeable resource. |
static String |
readString(InputStream in)
Reads all data from the given stream as UTF-8 character data and closes it on completion or errors.
|
static String |
readString(InputStream in,
Charset charset)
Reads all data from the given stream as character data in the given character set and closes it on completion
or errors.
|
public static final Charset UTF8
public static String readString(InputStream in) throws IOException
in
- Input stream containing character data.IOException
- On IO errors.public static String readString(InputStream in, Charset charset) throws IOException
in
- Input stream containing character data.charset
- Character set of data in stream.IOException
- On IO errors.Copyright © 2006–2019 Jasig. All rights reserved.