Method Summary |
|
public static void | closeStreams(InputStream inputStream, OutputStream outputStream) Close the provided input and output streams. |
public static String | contentsOfFile(File file) |
public static String | contentsOfFile(String fileName) |
public static void | copy(File inFile, File outFile) |
public static void | copy(InputStream in, OutputStream out) |
public static boolean | ensureFilePathExists(File file) Ensure that the provided file exists. |
public static boolean | ensureFilePathExists(String fileString) Ensure that the provided file name exists. |
public static boolean | ensurePathExists(File file) Ensure that the path to the provided file exists. |
public static boolean | ensurePathExists(String fileString) Ensure that the path to the provided file name exists. |
public static File | findExistingFile(String fileName) Return a File for an existing file. |
public static java.io.BufferedReader | getBufferedReaderFromFile(File file) |
public static java.io.BufferedReader | getBufferedReaderFromFile(String fileString) |
public static String | getExceptionMessage(Exception e, File file) |
public static String | getLogFileName() Return the name of the log file. |
public static void | iteratorToFile(Iterator it, String fileName) Write the provided iterator to a file of the provided file name. |
public static PrintStream | newPrintStreamOnFileNamed(File directory, String name) |
public static PrintWriter | newPrintWriterOnFileNamed(File directory, String name) Create and return a PrintWriter for the provided directory and file name. |
public static Object | readObjectFromBufferedFileObject(File file) Convert the provided File into a BufferedInputStream. |
public static Object | readObjectFromFile(File file) Read the provded file and return the contents as an Object. |
public static Object | readObjectFromFile(File directory, String name) Read the contents of the provided file name residing in the provided directory. |
public static Object | readObjectFromFileWithPath(String fileWithPath) Read the contents of the provided file name residing in the provided directory. |
public static void | redirectStandardOutput() Redirect standard output to the log file. |
public static void | redirectStandardOutput(File file) Redirect standard output to the provided File. |
public static void | redirectStandardOutput(String fileName) Redirect standard output to the provided file name. |
public static String | streamToString(InputStream inputStream) |
public static String | stringFromFile(File file) Return the contents of the provided file as a String. |
public static String | stringFromFile(String fileName) Return the contents of the provided file name as a String. |
public static void | stringToFile(String string, File file) Convert the provided String into the provided File. |
public static void | stringToFile(String string, String fileString) Convert the provided String into a File of the provided file name. |
public static void | stringToFileOutputStream(String string, FileOutputStream fos) Convert the provided String into the provided FileOutputStream. |
public static void | writeObjectToFile(Object object, File directory, String name) Write the provided object to a file of the provided directory and file name. |
public static void | writeObjectToFileObject(Object object, File file) Write the provided object to the provided File. |
public static void | writeObjectToFileWithPath(Object object, String fileAndPath) Write the provided object to the provided file name. |