org.dbmaintain.util
Class FileUtils
java.lang.Object
org.dbmaintain.util.FileUtils
public class FileUtils
- extends Object
- Author:
- Tim Ducheyne, Filip Neven
Method Summary |
static void |
createFile(File file,
Reader contentReader)
Creates a file and write the given content to it. |
static void |
createFile(File file,
String content)
Creates a file and write the given content to it. |
static URL |
getUrl(File file)
Creates an URL that points to the given file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUtils
public FileUtils()
getUrl
public static URL getUrl(File file)
- Creates an URL that points to the given file.
- Parameters:
file
- The file, not null
- Returns:
- The URL to the file, not null
createFile
public static void createFile(File file,
Reader contentReader)
throws IOException
- Creates a file and write the given content to it.
Note: the content reader is not closed.
- Parameters:
file
- The new file to create, not nullcontentReader
- The stream with the content for the file, not null
- Throws:
IOException
createFile
public static void createFile(File file,
String content)
throws IOException
- Creates a file and write the given content to it.
- Parameters:
file
- The new file to create, not nullcontent
- The content for the file, not null
- Throws:
IOException
Copyright © 2011. All Rights Reserved.