lexx.utils
Class FileUtil

java.lang.Object
  |
  +--lexx.utils.FileUtil

public final class FileUtil
extends java.lang.Object


Constructor Summary
FileUtil()
           
 
Method Summary
static void copyDirectory(java.io.File dir, java.io.File outputDir)
           
static void copyFile(java.io.File in, java.io.File out)
          Code taken from this website http://www.rgagnon.com/javadetails/java-0064.html
static void copyFile(java.io.InputStream fis, java.io.File out)
           
static void deleteOnExitRecursivly(java.io.File f)
           
static void deleteRecursivly(java.io.File f)
           
static void extractZip(java.io.File zipFile, java.io.File dirPath)
           
static void mkdirs(java.io.File f)
          The mkdirs() method in File doesn't work on Unix this is why I had to write my own one.
static void overwriteFile(java.io.File outputFile, java.lang.String data)
           
static void overwriteFile(java.lang.String fileName, java.lang.String data)
           
static java.lang.String[] readArrayFile(java.lang.String fileName)
           
static java.lang.String readFile(java.io.File f)
           
static java.lang.String readFile(java.io.InputStream in)
           
static java.lang.String readFile(java.lang.String fileName)
           
static void write(java.io.InputStream in, java.io.OutputStream out)
           
static void writeFile(java.lang.String fileName, java.lang.String data)
           
static void writeFile(java.lang.String fileName, java.lang.String[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

extractZip

public static void extractZip(java.io.File zipFile,
                              java.io.File dirPath)

write

public static void write(java.io.InputStream in,
                         java.io.OutputStream out)
                  throws java.io.IOException
java.io.IOException

deleteRecursivly

public static void deleteRecursivly(java.io.File f)

deleteOnExitRecursivly

public static void deleteOnExitRecursivly(java.io.File f)

readArrayFile

public static java.lang.String[] readArrayFile(java.lang.String fileName)

readFile

public static java.lang.String readFile(java.lang.String fileName)

readFile

public static java.lang.String readFile(java.io.File f)

readFile

public static java.lang.String readFile(java.io.InputStream in)

writeFile

public static void writeFile(java.lang.String fileName,
                             java.lang.String[] data)

writeFile

public static void writeFile(java.lang.String fileName,
                             java.lang.String data)

overwriteFile

public static void overwriteFile(java.lang.String fileName,
                                 java.lang.String data)

overwriteFile

public static void overwriteFile(java.io.File outputFile,
                                 java.lang.String data)

copyDirectory

public static void copyDirectory(java.io.File dir,
                                 java.io.File outputDir)

copyFile

public static void copyFile(java.io.File in,
                            java.io.File out)
Code taken from this website http://www.rgagnon.com/javadetails/java-0064.html


mkdirs

public static void mkdirs(java.io.File f)
The mkdirs() method in File doesn't work on Unix this is why I had to write my own one.

Parameters:
f -

copyFile

public static void copyFile(java.io.InputStream fis,
                            java.io.File out)