net.sf.sfac.file
Class FileUtils

java.lang.Object
  extended by net.sf.sfac.file.FileUtils

public class FileUtils
extends Object

Common file operations.


Constructor Summary
FileUtils()
           
 
Method Summary
static boolean areFilesEqual(File f1, File f2)
           
static boolean areFilesEqual(InputStream in1, InputStream in2)
           
static void copyFile(File source, File target)
           
static void copyFile(InputStream in, OutputStream out)
           
static void copyFile(Reader in, Writer out)
           
static void deleteFile(File fil)
           
static void ensureParentDirectoryExists(File f)
           
static InputStream getUncloseableStream(InputStream is)
           
static boolean isReservedFileBoundCharacters(char ch)
           
static boolean isReservedFileCharacters(char ch)
           
static void moveFile(File source, File target)
           
static String removeReservedFileCharacters(String src)
           
static void renameToBackup(File source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtils

public FileUtils()
Method Detail

copyFile

public static void copyFile(File source,
                            File target)
                     throws IOException
Throws:
IOException

copyFile

public static void copyFile(InputStream in,
                            OutputStream out)
                     throws IOException
Throws:
IOException

copyFile

public static void copyFile(Reader in,
                            Writer out)
                     throws IOException
Throws:
IOException

areFilesEqual

public static boolean areFilesEqual(File f1,
                                    File f2)
                             throws IOException
Throws:
IOException

areFilesEqual

public static boolean areFilesEqual(InputStream in1,
                                    InputStream in2)
                             throws IOException
Throws:
IOException

moveFile

public static void moveFile(File source,
                            File target)
                     throws IOException
Throws:
IOException

ensureParentDirectoryExists

public static void ensureParentDirectoryExists(File f)
                                        throws IOException
Throws:
IOException

deleteFile

public static void deleteFile(File fil)
                       throws IOException
Throws:
IOException

renameToBackup

public static void renameToBackup(File source)
                           throws IOException
Throws:
IOException

removeReservedFileCharacters

public static String removeReservedFileCharacters(String src)

isReservedFileCharacters

public static boolean isReservedFileCharacters(char ch)

isReservedFileBoundCharacters

public static boolean isReservedFileBoundCharacters(char ch)

getUncloseableStream

public static InputStream getUncloseableStream(InputStream is)


Copyright © 2012. All Rights Reserved.