org.apache.qpid.example.shared
Class FileUtils

java.lang.Object
  extended by org.apache.qpid.example.shared.FileUtils

public class FileUtils
extends Object

Class that provides file related utility methods for utility use


Constructor Summary
FileUtils()
           
 
Method Summary
static void deleteFile(String filePath)
           
static char[] getFileAsCharArray(String filePath)
           
static String getFileContent(String filePath)
           
static void moveFile(File fileToMove, File dest)
           
static void moveFile(File fileToMove, String dest)
           
static void moveFile(String fromPath, String dest)
           
static void moveFileToNewDir(File fileToMove, String newDir)
           
static void moveFileToNewDir(String path, String newDir)
           
static void writeStringToFile(String content, String path)
           
 
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

getFileContent

public static String getFileContent(String filePath)
                             throws IOException
Throws:
IOException

getFileAsCharArray

public static char[] getFileAsCharArray(String filePath)
                                 throws IOException
Throws:
IOException

writeStringToFile

public static void writeStringToFile(String content,
                                     String path)
                              throws IOException
Throws:
IOException

moveFileToNewDir

public static void moveFileToNewDir(String path,
                                    String newDir)
                             throws IOException
Throws:
IOException

moveFileToNewDir

public static void moveFileToNewDir(File fileToMove,
                                    String newDir)
                             throws IOException
Throws:
IOException

moveFile

public static void moveFile(String fromPath,
                            String dest)
                     throws IOException
Throws:
IOException

moveFile

public static void moveFile(File fileToMove,
                            String dest)
                     throws IOException
Throws:
IOException

moveFile

public static void moveFile(File fileToMove,
                            File dest)
                     throws IOException
Throws:
IOException

deleteFile

public static void deleteFile(String filePath)
                       throws IOException
Throws:
IOException


Licensed to the Apache Software Foundation