| 
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
| 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 void | 
copy(File from,
         File to)
copies a file to another  | 
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 | 
replace(String oldRegex,
               String replacement,
               File inFile,
               File outFile)
 | 
static void | 
replace(String oldRegex,
               String replacement,
               Reader reader,
               Writer writer)
Closes the streams!  | 
static URL | 
resolt(URL rootPath,
             String url)
Resolves the given URL (which may be relative) against a rootPath into an URL (which is always
 absolute). | 
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 - 
StringBuffer
IOException
public static StringBuffer readTextFile(URL url)
                                 throws IOException
InputStreamReader with encoding
 read from CharsetUtils.getSystemCharset()
url - 
StringBuffer
IOException
public static StringBuffer readTextFile(InputStream is)
                                 throws IOException
InputStreamReader with encoding
 read from CharsetUtils.getSystemCharset()
is - 
StringBuffer
IOException
public static StringBuffer readTextFile(Reader reader)
                                 throws IOException
reader - 
StringBuffer
IOException
public static void copy(File from,
                        File to)
                 throws IOException
from - to - 
IOException
public static void replace(String oldRegex,
                           String replacement,
                           File inFile,
                           File outFile)
                    throws IOException
oldRegex - replacement - inFile - file.encoding encoded text fileoutFile - file.encoding encoded text file
IOException
public static void replace(String oldRegex,
                           String replacement,
                           Reader reader,
                           Writer writer)
                    throws IOException
oldRegex - replacement - reader - writer - 
IOException
public static final URL resolt(URL rootPath,
                               String url)
                        throws MalformedURLException
URL (which is always
 absolute).
rootPath - url - 
MalformedURLException
  | 
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
| 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