Package com.sforce.ws.util
Class FileUtil
- java.lang.Object
-
- com.sforce.ws.util.FileUtil
-
public class FileUtil extends java.lang.ObjectThis class contains util method related to File handeling.- Since:
- 1.0 Nov 11, 2005
- Version:
- 1.0
- Author:
- http://cheenath.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEOLend of line
-
Constructor Summary
Constructors Constructor Description FileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopy(java.io.InputStream from, boolean closeInput, java.io.OutputStream to, boolean closeOutput)static voidcopy(java.io.InputStream from, java.io.OutputStream to)static voidcopy(java.io.InputStream from, java.io.OutputStream to, boolean closeOutput)static booleandeleteDir(java.io.File dir)static java.io.FilegetSystemTempDirectory(java.io.File parentTempDir)static java.util.List<java.io.File>listFilesRecursive(java.io.File dir, boolean includeDirs)static java.io.FilemakeTempDirectory(java.io.File parentTempDir, java.lang.String dirName, boolean deleteIfExists)static java.io.FilemakeTempDirectory(java.lang.String dirName, boolean deleteIfExists)static java.io.Filemkdirs(java.lang.String packageName, java.io.File root)static byte[]toBytes(java.io.InputStream in)static java.lang.StringtoString(java.io.File file)
-
-
-
Method Detail
-
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
-
-