public class IOUtils extends Object
Bunch of IO utilities
| Modifier and Type | Field and Description |
|---|---|
static String |
SYSTEM_CHAR_SET |
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(InputStream inputStream)
Closes an
InputStream silently |
static String |
inputStreamAsString(InputStream inputStream,
String charEncoding)
Reads an
InputStream into a String with the specified char encoding |
public static final String SYSTEM_CHAR_SET
public static String inputStreamAsString(InputStream inputStream, String charEncoding) throws IOException
Reads an InputStream into a String with the specified char encoding
inputStream - The InputStream to read fromcharEncoding - The charEncoding to use. If null the system default is used.String read.IOException - If the read failspublic static void closeQuietly(InputStream inputStream)
Closes an InputStream silently
inputStream - The InputStream to close.Copyright © 2017. All rights reserved.