com.massimo.tools.scriptrunner.utils
Class FileUtils
java.lang.Object
   com.massimo.tools.scriptrunner.utils.FileUtils
com.massimo.tools.scriptrunner.utils.FileUtils
- public class FileUtils 
- extends Object
Some simple file utilities.
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
READ_BUFFER_SIZE
public static final int READ_BUFFER_SIZE
- See Also:
- Constant Field Values
FileUtils
public FileUtils()
readFile
public static String readFile(File file)
                       throws IOException
- 
- Parameters:
- file-
- Returns:
- File contents as a String
- Throws:
- IOException
- FileNotFoundException
 
readFile
public static String readFile(InputStream in)
                       throws IOException
- 
- Parameters:
- in-
- Returns:
- InputStream contents as a String
- Throws:
- IOException
- FileNotFoundException
 
resolvePath
public static String resolvePath(String base,
                                 String path)
- 
- Parameters:
- base- Possible base for a relative path
- path- A relative or absolute path
- Returns:
- path, if it is absolute, or a combined path if the file exists
- Throws:
- IllegalArgumentException- if not file is found
 
writeFile
public static void writeFile(File file,
                             String text)
                      throws IOException
- 
- Parameters:
- file-
- text- File contents as a String
- Throws:
- IOException