|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.client.filesys.FileSysUtil
Title: $FileName: FileSysUtil.java$
Field Summary | |
private static int |
NO
|
private static int |
NO_ALL
|
private static int |
YES
|
private static int |
YES_ALL
|
Constructor Summary | |
private |
FileSysUtil()
|
Method Summary | |
static long |
fileCheckSum(byte[] file)
Returns the sum of all bytes in the byte array. |
static long |
fileCheckSum(java.io.File fl)
Returns the sum of all bytes in the file. |
static long |
fileCheckSum(java.lang.String sFullPathAndName)
Returns the sum of all bytes in the file. |
private static boolean |
interpretOverwriteResponse(int iResponse,
org.sourcejammer.util.RepeatingResponse repeating)
|
static void |
makeFileHidden(java.io.File file)
|
static void |
makeFileVisible(java.io.File file)
|
static void |
makeFileWritable(java.io.File file)
Makes a read-only file writable. |
private static int |
overwriteDialog(java.lang.String fileName,
java.awt.Component parentComponent)
|
static byte[] |
readLocalFile(java.io.File fileRead)
Returns the file at the specified location as an array of bytes. |
static byte[] |
readLocalFile(java.lang.String sFullPathAndName)
Returns the file at the specified location as an array of bytes. |
static java.lang.Object |
readObjectFromFileSys(java.io.File fileRead)
Read and return a serialized object from specified File. |
static boolean |
streamFileToFile(java.io.File flSource,
java.io.File flTarget,
boolean setToReadOnly)
|
static boolean |
streamFileToFile(java.io.File flSource,
java.io.File flTarget,
boolean setToReadOnly,
org.sourcejammer.util.RepeatingResponse repeating)
|
static boolean |
writeLocalFile(java.io.File flTargetDirectory,
java.lang.String sName,
byte[] file)
Write the byte array file to the specified directory using the specified name. |
static boolean |
writeLocalFile(java.io.File flTargetDirectory,
java.lang.String sName,
byte[] file,
boolean setToReadOnly)
Write the byte array file to the specified directory using the specified name. |
static boolean |
writeLocalFile(java.io.File flTargetDirectory,
java.lang.String sName,
byte[] file,
boolean setToReadOnly,
org.sourcejammer.util.RepeatingResponse repeating)
Write the byte array file to the specified directory using the specified name. |
static void |
writeObjectToFileSys(java.lang.Object o,
java.io.File fileWrite)
Writes the object to the specified location on the file system. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int YES
private static final int YES_ALL
private static final int NO
private static final int NO_ALL
Constructor Detail |
private FileSysUtil()
Method Detail |
public static byte[] readLocalFile(java.lang.String sFullPathAndName) throws java.io.IOException
java.io.IOException
public static byte[] readLocalFile(java.io.File fileRead) throws java.io.IOException
java.io.IOException
public static boolean writeLocalFile(java.io.File flTargetDirectory, java.lang.String sName, byte[] file) throws java.io.IOException
java.io.IOException
public static boolean streamFileToFile(java.io.File flSource, java.io.File flTarget, boolean setToReadOnly) throws java.io.IOException
java.io.IOException
public static boolean streamFileToFile(java.io.File flSource, java.io.File flTarget, boolean setToReadOnly, org.sourcejammer.util.RepeatingResponse repeating) throws java.io.IOException
java.io.IOException
public static boolean writeLocalFile(java.io.File flTargetDirectory, java.lang.String sName, byte[] file, boolean setToReadOnly) throws java.io.IOException
flTargetDirectory
- -- the directory to write the file to.sName
- -- the name to give the file.file
- -- the byte array that is the file's contents.setToReadOnly
- -- if true, sets the file to readonly after writing it.
java.io.IOException
private static boolean interpretOverwriteResponse(int iResponse, org.sourcejammer.util.RepeatingResponse repeating)
public static boolean writeLocalFile(java.io.File flTargetDirectory, java.lang.String sName, byte[] file, boolean setToReadOnly, org.sourcejammer.util.RepeatingResponse repeating) throws java.io.IOException
flTargetDirectory
- -- the directory to write the file to.sName
- -- the name to give the file.file
- -- the byte array that is the file's contents.setToReadOnly
- -- if true, sets the file to readonly after writing it.repeating
- -- To hold "all" response from dialog, if applicable.
java.io.IOException
private static int overwriteDialog(java.lang.String fileName, java.awt.Component parentComponent)
public static void makeFileHidden(java.io.File file) throws java.io.IOException
java.io.IOException
public static void makeFileVisible(java.io.File file) throws java.io.IOException
java.io.IOException
public static void makeFileWritable(java.io.File file) throws java.io.IOException
java.io.IOException
public static long fileCheckSum(java.lang.String sFullPathAndName) throws java.io.IOException
java.io.IOException
public static long fileCheckSum(java.io.File fl) throws java.io.IOException
java.io.IOException
public static long fileCheckSum(byte[] file)
public static java.lang.Object readObjectFromFileSys(java.io.File fileRead) throws java.io.IOException
java.io.IOException
public static void writeObjectToFileSys(java.lang.Object o, java.io.File fileWrite) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |