|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.virtuosotechnologies.lib.util.FileUtils
Various utilities for files and streams.
Method Summary | |
static Reader |
createUTFReader(InputStream stream)
Return an appropriate UTF-8 or UTF-16 Reader for the given InputStream, based on an optional leading byte order mark. |
static String |
readCompletely(Reader reader)
Read a stream completely into a string |
static String |
readFileCompletely(File file)
Read a file completely into a string |
static String |
readResourceCompletely(Class parentClass,
String name)
Read a resource completely into a string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static String readCompletely(Reader reader) throws IOException
reader
- stream to read
IOException
public static String readFileCompletely(File file) throws IOException
file
- File to read
IOException
public static String readResourceCompletely(Class parentClass, String name) throws IOException
parentClass
- class the resource is relative toname
- resource name
IOException
public static Reader createUTFReader(InputStream stream) throws IOException
stream
- InputStream to wrap
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |