|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(java.lang.String fileName,
java.lang.String data)
appends the passed string to the file identified by the passed name. |
static void |
copy(java.io.File from,
java.io.File to)
copies a file to another |
static java.lang.StringBuffer |
readTextFile(java.io.File file)
reads a Text file from its resource. |
static java.lang.StringBuffer |
readTextFile(java.io.InputStream is)
reads a Text file from its resource. |
static java.lang.StringBuffer |
readTextFile(java.io.Reader reader)
reads a Text file from its resource. |
static java.lang.StringBuffer |
readTextFile(java.net.URL url)
reads a Text file from its resource. |
static void |
replace(java.lang.String oldRegex,
java.lang.String replacement,
java.io.File inFile,
java.io.File outFile)
|
static void |
replace(java.lang.String oldRegex,
java.lang.String replacement,
java.io.Reader reader,
java.io.Writer writer)
Closes the streams! |
static java.net.URL |
resolt(java.net.URL rootPath,
java.lang.String url)
Resolves the given URL (which may be relative) against a rootPath into an URL (which is always
absolute). |
static void |
writeToFile(java.lang.String fileName,
java.lang.String data)
writes the the passed string to a file created using the passed file name. |
static void |
writeToFile(java.lang.String fileName,
java.lang.String data,
java.lang.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(java.lang.String fileName, java.lang.String data) throws java.io.IOException
OutputStreamReader
with encoding read from CharsetUtils.getSystemCharset()
.
fileName
- data
-
java.io.IOException
public static final void writeToFile(java.lang.String fileName, java.lang.String data, java.lang.String encoding) throws java.io.IOException
fileName
- data
- encoding
-
java.io.IOException
public static final void appendsToFile(java.lang.String fileName, java.lang.String data) throws java.io.IOException
fileName
- data
-
java.io.IOException
public static java.lang.StringBuffer readTextFile(java.io.File file) throws java.io.IOException
InputStreamReader
with encoding
read from CharsetUtils.getSystemCharset()
file
-
StringBuffer
java.io.IOException
public static java.lang.StringBuffer readTextFile(java.net.URL url) throws java.io.IOException
InputStreamReader
with encoding
read from CharsetUtils.getSystemCharset()
url
-
StringBuffer
java.io.IOException
public static java.lang.StringBuffer readTextFile(java.io.InputStream is) throws java.io.IOException
InputStreamReader
with encoding
read from CharsetUtils.getSystemCharset()
is
-
StringBuffer
java.io.IOException
public static java.lang.StringBuffer readTextFile(java.io.Reader reader) throws java.io.IOException
reader
-
StringBuffer
java.io.IOException
public static void copy(java.io.File from, java.io.File to) throws java.io.IOException
from
- to
-
java.io.IOException
public static void replace(java.lang.String oldRegex, java.lang.String replacement, java.io.File inFile, java.io.File outFile) throws java.io.IOException
oldRegex
- replacement
- inFile
- file.encoding encoded text fileoutFile
- file.encoding encoded text file
java.io.IOException
public static void replace(java.lang.String oldRegex, java.lang.String replacement, java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
oldRegex
- replacement
- reader
- writer
-
java.io.IOException
public static final java.net.URL resolt(java.net.URL rootPath, java.lang.String url) throws java.net.MalformedURLException
URL
(which is always
absolute).
rootPath
- url
-
java.net.MalformedURLException
|
deegree 2.5 (2011/06/29 09:44 build-8-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://www.deegree.org