|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.util.FileUtils
public class FileUtils
| Constructor Summary | |
|---|---|
FileUtils()
|
|
| Method Summary | |
|---|---|
static int |
copy(java.io.InputStream input,
java.io.OutputStream output)
Copy bytes from an InputStream to an OutputStream. |
static int |
copy(java.io.InputStream input,
java.io.OutputStream output,
int bufferSize)
Copy bytes from an InputStream to an OutputStream. |
static void |
copyDirectory(java.io.File srcDir,
java.io.File destDir)
|
static void |
copyDirectory(java.io.File srcDir,
java.io.File destDir,
boolean overwrite)
|
static void |
copyFile(java.io.File source,
java.io.File destination)
Copy file from source to destination. |
static boolean |
deleteDir(java.io.File dir)
safely performs a recursive delete on a directory |
static void |
extractZipFiles(java.lang.String zipFileName,
java.io.File destintationDirectory)
Extract all the contents of a zip file into a target directory. |
static void |
shutdownStream(java.io.InputStream input)
Unconditionally close an InputStream. |
static void |
shutdownStream(java.io.OutputStream output)
Unconditionally close an OutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileUtils()
| Method Detail |
|---|
public static void copyFile(java.io.File source,
java.io.File destination)
throws java.io.IOException
destination will be
created if they don't already exist. destination will be overwritten if it
already exists.
source - An existing non-directory File to copy bytes from.destination - A non-directory File to write bytes to (possibly
overwriting).
java.io.IOException - if source does not exist, destination cannot be
written to, or an IO error occurs during copying.
public static int copy(java.io.InputStream input,
java.io.OutputStream output)
throws java.io.IOException
InputStream to an OutputStream.
input - the InputStream to read fromoutput - the OutputStream to write to
java.io.IOException - In case of an I/O problem
public static int copy(java.io.InputStream input,
java.io.OutputStream output,
int bufferSize)
throws java.io.IOException
InputStream to an OutputStream.
input - the InputStream to read fromoutput - the OutputStream to write tobufferSize - Size of internal buffer to use.
java.io.IOException - In case of an I/O problempublic static void shutdownStream(java.io.OutputStream output)
OutputStream.
Equivalent to OutputStream.close(), except any exceptions will be ignored.
output - A (possibly null) OutputStreampublic static void shutdownStream(java.io.InputStream input)
InputStream.
Equivalent to InputStream.close(), except any exceptions will be ignored.
input - A (possibly null) InputStream
public static void copyDirectory(java.io.File srcDir,
java.io.File destDir)
throws java.io.IOException
srcDir - destDir -
java.io.IOException
java.lang.IllegalArgumentException - if the srcDir does not exist
public static void copyDirectory(java.io.File srcDir,
java.io.File destDir,
boolean overwrite)
throws java.io.IOException
srcDir - destDir - overwrite -
java.io.IOExceptionpublic static boolean deleteDir(java.io.File dir)
dir -
public static void extractZipFiles(java.lang.String zipFileName,
java.io.File destintationDirectory)
zipFileName - destintationDirectory -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||