| java.lang.Object org.sourcejammer.util.FileUtil
FileUtil | public class FileUtil (Code) | | Title: $FileName: FileUtil.java$
author: $AuthorName: Rob MacGrogan$ version: $VerNum: 4$
version: $Description: $ version: $KeyWordsOff: $
|
Method Summary | |
public static void | copyDirectory(File sourceDir, File targetDir) Recursively copy a directory. | public static void | copyDirectory(File sourceDir, File targetDir, Spinner spinner) Recursively copy a directory. | public static File | copyFile(String fileName, File sourceDir, File targetDir) Copy the specified file from sourceDir to targetDir. | public static File | copyFile(String fileName, File sourceDir, File targetDir, boolean overwrite) Copy the specified file from sourceDir to targetDir. | public static String | getExtension(String fileName) Copied from HistoryTypeMapper in cient. | public static void | handlerStreamFileToFile(File source, File target) | public static void | handlerStreamFileToOutputStream(File source, OutputStream target) | public static void | inputStreamToOutputStream(InputStream stmIn, OutputStream stmOut) | public static boolean | isBinaryFile(File the_file) Copied from com.jj.javadiff.BinaryHandler, part of the javadiff
package available from Launch Software (www.launchsoftware.com). | public static void | main(String[] args) | public static void | moveDirectory(File sourceDir, File targetDir) Move a directory and all its contents. | public static void | moveDirectory(File sourceDir, File targetDir, Spinner spinner) Move a directory and all its contents. | public static File | moveFile(String fileName, File sourceDir, File targetDir) Move the specified file from sourceDir to targetDir. | public static File | moveFile(String fileName, File sourceDir, File targetDir, boolean overwrite) Move the specified file from sourceDir to targetDir. | public static byte[] | newReadBytesFromFileSys(File fileRead) | public static void | newStreamFileToFile(File source, File target) | public static void | oldStreamFileToFile(File source, File target) | public static void | optStreamFileToFile(File source, File target) | public static byte[] | readBytesFromFileSys(String fullPathAndName) | public static byte[] | readBytesFromFileSys(File fileRead) | public static Object | readObjectFromFileSys(String fullPathAndName) Gets an object from file system. | public static Object | readObjectFromFileSys(File fileRead) Gets an object from file system. | public static void | sendBytesToSendBytesDataSource(SendBytesDataSource source, byte[] by) | public static void | simpleStreamFileToFile(File source, File target) | public static void | streamFileToFile(File source, File target) | public static void | writeBytesToFileSys(byte[] file, String fullPathAndName) Saves byte array as a file using fullPathAndName as location. | public static void | writeBytesToFileSys(byte[] file, File fileWrite) Saves byte array as a file using fullPathAndName as location. | public static void | writeObjectToFileSys(Object o, String fullPathAndName) Writes the object to the specified location on the
file system. | public static void | writeObjectToFileSys(Object o, File fileWrite) Writes the object to the specified location on the
file system. |
copyDirectory | public static void copyDirectory(File sourceDir, File targetDir) throws IOException(Code) | | Recursively copy a directory.
|
copyFile | public static File copyFile(String fileName, File sourceDir, File targetDir, boolean overwrite) throws IOException(Code) | | Copy the specified file from sourceDir to targetDir. Throws IOException if
oerwrite is true and target file already exists.
|
getExtension | public static String getExtension(String fileName)(Code) | | Copied from HistoryTypeMapper in cient.
|
isBinaryFile | public static boolean isBinaryFile(File the_file)(Code) | | Copied from com.jj.javadiff.BinaryHandler, part of the javadiff
package available from Launch Software (www.launchsoftware.com).
|
moveDirectory | public static void moveDirectory(File sourceDir, File targetDir) throws IOException(Code) | | Move a directory and all its contents.
|
moveFile | public static File moveFile(String fileName, File sourceDir, File targetDir, boolean overwrite) throws IOException(Code) | | Move the specified file from sourceDir to targetDir. Throws IOException if
oerwrite is true and target file already exists.
|
newReadBytesFromFileSys | public static byte[] newReadBytesFromFileSys(File fileRead) throws IOException(Code) | | |
readObjectFromFileSys | public static Object readObjectFromFileSys(String fullPathAndName) throws IOException(Code) | | Gets an object from file system.
|
readObjectFromFileSys | public static Object readObjectFromFileSys(File fileRead) throws IOException(Code) | | Gets an object from file system.
|
writeBytesToFileSys | public static void writeBytesToFileSys(byte[] file, String fullPathAndName) throws IOException(Code) | | Saves byte array as a file using fullPathAndName as location.
|
writeBytesToFileSys | public static void writeBytesToFileSys(byte[] file, File fileWrite) throws IOException(Code) | | Saves byte array as a file using fullPathAndName as location.
|
writeObjectToFileSys | public static void writeObjectToFileSys(Object o, String fullPathAndName) throws IOException(Code) | | Writes the object to the specified location on the
file system. If the file already exists, it will be overwritten.
|
writeObjectToFileSys | public static void writeObjectToFileSys(Object o, File fileWrite) throws IOException(Code) | | Writes the object to the specified location on the
file system. If the file already exists, it will be overwritten.
|
|
|