com.sforce.ws.util
Class FileUtil
java.lang.Object
com.sforce.ws.util.FileUtil
public class FileUtil
- extends java.lang.Object
This class contains util method related to File handeling.
- Since:
- 1.0 Nov 11, 2005
- Version:
- 1.0
- Author:
- http://cheenath.com
|
Field Summary |
static java.lang.String |
EOL
end of line |
|
Method Summary |
static void |
copy(java.io.InputStream from,
boolean closeInput,
java.io.OutputStream to,
boolean closeOutput)
|
static void |
copy(java.io.InputStream from,
java.io.OutputStream to)
|
static void |
copy(java.io.InputStream from,
java.io.OutputStream to,
boolean closeOutput)
|
static boolean |
deleteDir(java.io.File dir)
|
static java.io.File |
getSystemTempDirectory(java.io.File parentTempDir)
|
static java.util.List<java.io.File> |
listFilesRecursive(java.io.File dir,
boolean includeDirs)
|
static java.io.File |
makeTempDirectory(java.io.File parentTempDir,
java.lang.String dirName,
boolean deleteIfExists)
|
static java.io.File |
makeTempDirectory(java.lang.String dirName,
boolean deleteIfExists)
|
static java.io.File |
mkdirs(java.lang.String packageName,
java.io.File root)
|
static byte[] |
toBytes(java.io.InputStream in)
|
static java.lang.String |
toString(java.io.File file)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EOL
public static final java.lang.String EOL
- end of line
FileUtil
public FileUtil()
toString
public static java.lang.String toString(java.io.File file)
throws java.io.IOException
- Parameters:
file -
- Returns:
-
- Throws:
java.io.IOException
toBytes
public static byte[] toBytes(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
copy
public static void copy(java.io.InputStream from,
java.io.OutputStream to)
throws java.io.IOException
- Throws:
java.io.IOException
copy
public static void copy(java.io.InputStream from,
java.io.OutputStream to,
boolean closeOutput)
throws java.io.IOException
- Throws:
java.io.IOException
copy
public static void copy(java.io.InputStream from,
boolean closeInput,
java.io.OutputStream to,
boolean closeOutput)
throws java.io.IOException
- Throws:
java.io.IOException
mkdirs
public static java.io.File mkdirs(java.lang.String packageName,
java.io.File root)
deleteDir
public static boolean deleteDir(java.io.File dir)
listFilesRecursive
public static java.util.List<java.io.File> listFilesRecursive(java.io.File dir,
boolean includeDirs)
makeTempDirectory
public static java.io.File makeTempDirectory(java.lang.String dirName,
boolean deleteIfExists)
throws java.io.IOException
- Throws:
java.io.IOException
makeTempDirectory
public static java.io.File makeTempDirectory(java.io.File parentTempDir,
java.lang.String dirName,
boolean deleteIfExists)
throws java.io.IOException
- Throws:
java.io.IOException
getSystemTempDirectory
public static java.io.File getSystemTempDirectory(java.io.File parentTempDir)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2011. All Rights Reserved.