|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.framework.util.FileUtils
public class FileUtils
the class offeres several static methods for handling file access
Constructor Summary | |
---|---|
FileUtils()
|
Method Summary | |
---|---|
static void |
appendsToFile(String fileName,
String data)
appends the passed string to the file identified by the passed name. |
static StringBuffer |
readTextFile(File file)
reads a Text file from its resource. |
static StringBuffer |
readTextFile(InputStream is)
reads a Text file from its resource. |
static StringBuffer |
readTextFile(Reader reader)
reads a Text file from its resource. |
static StringBuffer |
readTextFile(URL url)
reads a Text file from its resource. |
static void |
writeToFile(String fileName,
String data)
writes the the passed string to a file created using the passed file name. |
static void |
writeToFile(String fileName,
String data,
String encoding)
writes the the passed string to a file created using the passed file name using the defined character encoding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtils()
Method Detail |
---|
public static final void writeToFile(String fileName, String data) throws IOException
OutputStreamReader
with encoding read from
CharsetUtils.getSystemCharset()
.
fileName
- data
-
IOException
public static final void writeToFile(String fileName, String data, String encoding) throws IOException
fileName
- data
- encoding
-
IOException
public static final void appendsToFile(String fileName, String data) throws IOException
fileName
- data
-
IOException
public static StringBuffer readTextFile(File file) throws IOException
InputStreamReader
with encoding read from
CharsetUtils.getSystemCharset()
file
-
IOException
public static StringBuffer readTextFile(URL url) throws IOException
InputStreamReader
with encoding read from
CharsetUtils.getSystemCharset()
url
-
IOException
public static StringBuffer readTextFile(InputStream is) throws IOException
InputStreamReader
with encoding read from
CharsetUtils.getSystemCharset()
is
-
IOException
public static StringBuffer readTextFile(Reader reader) throws IOException
reader
-
IOException
|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net