Package net.bluemind.utils
Class FileUtils
java.lang.Object
net.bluemind.utils.FileUtils
File manipulation functions
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
File copy, from Java Performance bookstatic void
static InputStream
dumpStream
(InputStream in, PrintStream dump, boolean closeIn) static byte[]
streamBytes
(InputStream in, boolean closeIn) static String
streamString
(InputStream in, boolean closeIn) static String
streamString
(InputStream in, boolean closeIn, Charset charset) static void
transfer
(InputStream in, OutputStream out, boolean closeIn) Fast stream transfer method
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
copy
File copy, from Java Performance book- Parameters:
src
-dest
-- Throws:
IOException
-
transfer
Fast stream transfer method- Parameters:
in
-out
-- Throws:
IOException
-
streamString
- Throws:
IOException
-
streamString
public static String streamString(InputStream in, boolean closeIn, Charset charset) throws IOException - Throws:
IOException
-
streamBytes
- Throws:
IOException
-
dumpStream
public static InputStream dumpStream(InputStream in, PrintStream dump, boolean closeIn) throws IOException - Throws:
IOException
-
delete
-
cleanDir
-