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