|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.util.FileUtil
Title: $FileName: FileUtil.java$
Field Summary | |
private static int |
BUFFER_SIZE
|
Constructor Summary | |
private |
FileUtil()
|
Method Summary | |
private static void |
channelToOutputStream(java.nio.channels.ByteChannel channel,
java.io.OutputStream outputStream)
|
static void |
copyDirectory(java.io.File sourceDir,
java.io.File targetDir)
Recursively copy a directory. |
private static void |
copyDirectory(java.io.File sourceDir,
java.io.File targetDir,
boolean isMove)
Recursively copy a directory. |
private static void |
copyDirectory(java.io.File sourceDir,
java.io.File targetDir,
boolean isMove,
Spinner spinner)
Recursively copy a directory. |
static void |
copyDirectory(java.io.File sourceDir,
java.io.File targetDir,
Spinner spinner)
Recursively copy a directory. |
static java.io.File |
copyFile(java.lang.String fileName,
java.io.File sourceDir,
java.io.File targetDir)
Copy the specified file from sourceDir to targetDir. |
static java.io.File |
copyFile(java.lang.String fileName,
java.io.File sourceDir,
java.io.File targetDir,
boolean overwrite)
Copy the specified file from sourceDir to targetDir. |
static java.lang.String |
getExtension(java.lang.String fileName)
Copied from HistoryTypeMapper in cient. |
static void |
handlerStreamFileToFile(java.io.File source,
java.io.File target)
|
static void |
handlerStreamFileToOutputStream(java.io.File source,
java.io.OutputStream target)
|
static void |
inputStreamToOutputStream(java.io.InputStream stmIn,
java.io.OutputStream stmOut)
|
static boolean |
isBinaryFile(java.io.File the_file)
Copied from com.jj.javadiff.BinaryHandler, part of the javadiff package available from Launch Software (www.launchsoftware.com). |
static void |
main(java.lang.String[] args)
|
static void |
moveDirectory(java.io.File sourceDir,
java.io.File targetDir)
Move a directory and all its contents. |
static void |
moveDirectory(java.io.File sourceDir,
java.io.File targetDir,
Spinner spinner)
Move a directory and all its contents. |
static java.io.File |
moveFile(java.lang.String fileName,
java.io.File sourceDir,
java.io.File targetDir)
Move the specified file from sourceDir to targetDir. |
static java.io.File |
moveFile(java.lang.String fileName,
java.io.File sourceDir,
java.io.File targetDir,
boolean overwrite)
Move the specified file from sourceDir to targetDir. |
static byte[] |
newReadBytesFromFileSys(java.io.File fileRead)
|
static void |
newStreamFileToFile(java.io.File source,
java.io.File target)
|
static void |
oldStreamFileToFile(java.io.File source,
java.io.File target)
|
static void |
optStreamFileToFile(java.io.File source,
java.io.File target)
|
static byte[] |
readBytesFromFileSys(java.io.File fileRead)
|
static byte[] |
readBytesFromFileSys(java.lang.String fullPathAndName)
|
static java.lang.Object |
readObjectFromFileSys(java.io.File fileRead)
Gets an object from file system. |
static java.lang.Object |
readObjectFromFileSys(java.lang.String fullPathAndName)
Gets an object from file system. |
static void |
sendBytesToSendBytesDataSource(SendBytesDataSource source,
byte[] by)
|
static void |
simpleStreamFileToFile(java.io.File source,
java.io.File target)
|
static void |
streamFileToFile(java.io.File source,
java.io.File target)
|
static void |
writeBytesToFileSys(byte[] file,
java.io.File fileWrite)
Saves byte array as a file using fullPathAndName as location. |
static void |
writeBytesToFileSys(byte[] file,
java.lang.String fullPathAndName)
Saves byte array as a file using fullPathAndName as location. |
static void |
writeObjectToFileSys(java.lang.Object o,
java.io.File fileWrite)
Writes the object to the specified location on the file system. |
static void |
writeObjectToFileSys(java.lang.Object o,
java.lang.String fullPathAndName)
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 BUFFER_SIZE
Constructor Detail |
private FileUtil()
Method Detail |
public static void sendBytesToSendBytesDataSource(SendBytesDataSource source, byte[] by) throws java.io.IOException
java.io.IOException
public static void writeBytesToFileSys(byte[] file, java.lang.String fullPathAndName) throws java.io.IOException
java.io.IOException
public static void writeBytesToFileSys(byte[] file, java.io.File fileWrite) throws java.io.IOException
java.io.IOException
public static byte[] readBytesFromFileSys(java.lang.String fullPathAndName) throws java.io.IOException
java.io.IOException
private static void channelToOutputStream(java.nio.channels.ByteChannel channel, java.io.OutputStream outputStream) throws java.io.IOException
java.io.IOException
public static byte[] newReadBytesFromFileSys(java.io.File fileRead) throws java.io.IOException
java.io.IOException
public static byte[] readBytesFromFileSys(java.io.File fileRead) throws java.io.IOException
java.io.IOException
public static java.lang.Object readObjectFromFileSys(java.lang.String fullPathAndName) throws java.io.IOException
java.io.IOException
public static void writeObjectToFileSys(java.lang.Object o, java.lang.String fullPathAndName) 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
public static java.lang.Object readObjectFromFileSys(java.io.File fileRead) throws java.io.IOException
java.io.IOException
public static void inputStreamToOutputStream(java.io.InputStream stmIn, java.io.OutputStream stmOut) throws java.io.IOException
java.io.IOException
public static void streamFileToFile(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException
public static void oldStreamFileToFile(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException
public static void simpleStreamFileToFile(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException
public static void handlerStreamFileToFile(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException
public static void handlerStreamFileToOutputStream(java.io.File source, java.io.OutputStream target) throws java.io.IOException
java.io.IOException
public static void optStreamFileToFile(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException
public static void newStreamFileToFile(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException
public static java.lang.String getExtension(java.lang.String fileName)
public static java.io.File moveFile(java.lang.String fileName, java.io.File sourceDir, java.io.File targetDir) throws java.io.IOException
java.io.IOException
public static java.io.File moveFile(java.lang.String fileName, java.io.File sourceDir, java.io.File targetDir, boolean overwrite) throws java.io.IOException
java.io.IOException
public static void moveDirectory(java.io.File sourceDir, java.io.File targetDir) throws java.io.IOException
java.io.IOException
public static void copyDirectory(java.io.File sourceDir, java.io.File targetDir) throws java.io.IOException
java.io.IOException
public static void moveDirectory(java.io.File sourceDir, java.io.File targetDir, Spinner spinner) throws java.io.IOException
java.io.IOException
public static void copyDirectory(java.io.File sourceDir, java.io.File targetDir, Spinner spinner) throws java.io.IOException
java.io.IOException
private static void copyDirectory(java.io.File sourceDir, java.io.File targetDir, boolean isMove) throws java.io.IOException
java.io.IOException
private static void copyDirectory(java.io.File sourceDir, java.io.File targetDir, boolean isMove, Spinner spinner) throws java.io.IOException
java.io.IOException
public static java.io.File copyFile(java.lang.String fileName, java.io.File sourceDir, java.io.File targetDir) throws java.io.IOException
java.io.IOException
public static java.io.File copyFile(java.lang.String fileName, java.io.File sourceDir, java.io.File targetDir, boolean overwrite) throws java.io.IOException
java.io.IOException
public static boolean isBinaryFile(java.io.File the_file)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |