| java.lang.Object org.sourcejammer.client.filesys.FileSysUtil
FileSysUtil | public class FileSysUtil (Code) | | Title: $FileName: FileSysUtil.java$
author: $AuthorName: Rob MacGrogan$ version: $VerNum: 4$
version: $Description: $. version: $KeyWordsOff: $
version: Client file system utilities. |
Method Summary | |
public static long | fileCheckSum(String sFullPathAndName) Returns the sum of all bytes in the file. | public static long | fileCheckSum(File fl) Returns the sum of all bytes in the file. | public static long | fileCheckSum(byte[] file) Returns the sum of all bytes in the byte array. | public static void | makeFileHidden(java.io.File file) | public static void | makeFileVisible(java.io.File file) | public static void | makeFileWritable(java.io.File file) Makes a read-only file writable. | public static byte[] | readLocalFile(String sFullPathAndName) Returns the file at the specified location as an array of bytes. | public static byte[] | readLocalFile(File fileRead) Returns the file at the specified location as an array of bytes. | public static Object | readObjectFromFileSys(File fileRead) Read and return a serialized object from specified File. | public static boolean | streamFileToFile(java.io.File flSource, java.io.File flTarget, boolean setToReadOnly) | public static boolean | streamFileToFile(java.io.File flSource, java.io.File flTarget, boolean setToReadOnly, RepeatingResponse repeating) | public static boolean | writeLocalFile(java.io.File flTargetDirectory, String sName, byte[] file) Write the byte array file to the specified directory using the specified
name. | public static boolean | writeLocalFile(java.io.File flTargetDirectory, String sName, byte[] file, boolean setToReadOnly) Write the byte array file to the specified directory using the specified
name.
Parameters: flTargetDirectory - -- the directory to write the file to. Parameters: sName - -- the name to give the file. Parameters: file - -- the byte array that is the file's contents. Parameters: setToReadOnly - -- if true, sets the file to readonly after writing it. | public static boolean | writeLocalFile(java.io.File flTargetDirectory, String sName, byte[] file, boolean setToReadOnly, RepeatingResponse repeating) Write the byte array file to the specified directory using the specified
name.
Parameters: flTargetDirectory - -- the directory to write the file to. Parameters: sName - -- the name to give the file. Parameters: file - -- the byte array that is the file's contents. Parameters: setToReadOnly - -- if true, sets the file to readonly after writing it. Parameters: repeating - -- To hold "all" response from dialog, if applicable. | public static void | writeObjectToFileSys(Object o, File fileWrite) Writes the object to the specified location on the
file system. |
fileCheckSum | public static long fileCheckSum(String sFullPathAndName) throws IOException(Code) | | Returns the sum of all bytes in the file.
|
fileCheckSum | public static long fileCheckSum(File fl) throws IOException(Code) | | Returns the sum of all bytes in the file.
|
fileCheckSum | public static long fileCheckSum(byte[] file)(Code) | | Returns the sum of all bytes in the byte array.
|
readLocalFile | public static byte[] readLocalFile(String sFullPathAndName) throws IOException(Code) | | Returns the file at the specified location as an array of bytes.
|
readLocalFile | public static byte[] readLocalFile(File fileRead) throws IOException(Code) | | Returns the file at the specified location as an array of bytes.
|
readObjectFromFileSys | public static Object readObjectFromFileSys(File fileRead) throws IOException(Code) | | Read and return a serialized object from specified File.
|
writeLocalFile | public static boolean writeLocalFile(java.io.File flTargetDirectory, String sName, byte[] file) throws IOException(Code) | | Write the byte array file to the specified directory using the specified
name.
true if file is successfully written. |
writeLocalFile | public static boolean writeLocalFile(java.io.File flTargetDirectory, String sName, byte[] file, boolean setToReadOnly) throws IOException(Code) | | Write the byte array file to the specified directory using the specified
name.
Parameters: flTargetDirectory - -- the directory to write the file to. Parameters: sName - -- the name to give the file. Parameters: file - -- the byte array that is the file's contents. Parameters: setToReadOnly - -- if true, sets the file to readonly after writing it. true if file is successfully written. |
writeLocalFile | public static boolean writeLocalFile(java.io.File flTargetDirectory, String sName, byte[] file, boolean setToReadOnly, RepeatingResponse repeating) throws IOException(Code) | | Write the byte array file to the specified directory using the specified
name.
Parameters: flTargetDirectory - -- the directory to write the file to. Parameters: sName - -- the name to give the file. Parameters: file - -- the byte array that is the file's contents. Parameters: setToReadOnly - -- if true, sets the file to readonly after writing it. Parameters: repeating - -- To hold "all" response from dialog, if applicable. true if file is successfully written. |
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.
|
|
|