|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.util.FileUtil
public class FileUtil
Constructor Summary | |
---|---|
FileUtil()
|
Method Summary | |
---|---|
static void |
copyContents(java.io.InputStream in,
java.io.OutputStream out)
Just copies all bytes from in to out. |
static void |
copyContents(java.io.Reader in,
java.io.Writer out)
Just copies all characters from in to out. |
static java.util.Properties |
findProperties(java.lang.String[] propertyPaths)
Takes a list of paths and attempts to locate a property file from the list. |
static java.lang.String |
readContents(java.io.InputStream input,
java.lang.String encoding)
Reads in file contents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtil()
Method Detail |
---|
public static void copyContents(java.io.Reader in, java.io.Writer out) throws java.io.IOException
in
- The reader to copy fromout
- The reader to copy to
java.io.IOException
- If reading or writing failed.public static void copyContents(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- The inputstream to copy fromout
- The outputstream to copy to
java.io.IOException
- In case reading or writing fails.public static java.lang.String readContents(java.io.InputStream input, java.lang.String encoding) throws java.io.IOException
input
- The InputStream to read from.encoding
- The encoding to assume at first.
java.io.IOException
- If the stream cannot be read or the stream cannot be
decoded.public static java.util.Properties findProperties(java.lang.String[] propertyPaths) throws java.io.IOException
propertyPaths
-
java.io.IOException
- If the reading failed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |