Package net.bluemind.utils
Class FileUtils
java.lang.Object
net.bluemind.utils.FileUtils
File manipulation functions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidFile copy, from Java Performance bookstatic voidstatic InputStreamdumpStream(InputStream in, PrintStream dump, boolean closeIn) static Pathstatic booleanisDirEmpty(Path dirPath) static byte[]streamBytes(InputStream in, boolean closeIn) static StringstreamString(InputStream in, boolean closeIn) static StringstreamString(InputStream in, boolean closeIn, Charset charset) tempFileTransfert(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> stream) static voidtransfer(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
-
getTempPath
-
tempFileTransfert
public static FileUtils.TempFileTransfertResult tempFileTransfert(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> stream) -
isDirEmpty
- Throws:
IOException
-