Package com.sforce.ws.util
Class FileUtil
java.lang.Object
com.sforce.ws.util.FileUtil
This class contains util method related to File handeling.
- Since:
- 1.0 Nov 11, 2005
- Version:
- 1.0
- Author:
- http://cheenath.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopy(InputStream from, boolean closeInput, OutputStream to, boolean closeOutput) static voidcopy(InputStream from, OutputStream to) static voidcopy(InputStream from, OutputStream to, boolean closeOutput) static booleanstatic FilegetSystemTempDirectory(File parentTempDir) listFilesRecursive(File dir, boolean includeDirs) static FilemakeTempDirectory(File parentTempDir, String dirName, boolean deleteIfExists) static FilemakeTempDirectory(String dirName, boolean deleteIfExists) static Filestatic byte[]toBytes(InputStream in) static String
-
Field Details
-
EOL
end of line
-
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
toString
- Parameters:
file-- Returns:
- Throws:
IOException
-
toBytes
- Throws:
IOException
-
copy
- Throws:
IOException
-
copy
- Throws:
IOException
-
copy
public static void copy(InputStream from, boolean closeInput, OutputStream to, boolean closeOutput) throws IOException - Throws:
IOException
-
mkdirs
-
deleteDir
-
listFilesRecursive
-
makeTempDirectory
- Throws:
IOException
-
makeTempDirectory
public static File makeTempDirectory(File parentTempDir, String dirName, boolean deleteIfExists) throws IOException - Throws:
IOException
-
getSystemTempDirectory
- Throws:
IOException
-