public class IOUtils extends Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
resourceAsString(String path)
Use this classes ClassLoader to get the resource InputStream and convert it to a UTF-8 String.
|
static String |
resourceAsString(String path,
String encoding)
Use this classes ClassLoader to get the resource InputStream and convert it to a String.
|
static String |
toString(InputStream in)
Simple looper which takes an InputStream fully and returns it as UTF-8 String.
|
static String |
toString(InputStream in,
String encoding)
Simple looper which takes an InputStream fully and returns it as String.
|
public static String toString(InputStream in, String encoding) throws IOException
in - filled InputStreamencoding - target encoding for the stringIOExceptionpublic static String toString(InputStream in) throws IOException
in - filled InputStreamIOExceptionpublic static String resourceAsString(String path, String encoding) throws IOException
path - relative path in the ClassLoader, e.g. in resource directoriesencoding - target encoding for the stringIOExceptionpublic static String resourceAsString(String path) throws IOException
path - relative path in the ClassLoader, e.g. in resource directoriesIOExceptionCopyright © 2015. All rights reserved.