Added File copy method
This commit is contained in:
parent
25d70c8075
commit
d3f3c02f78
4 changed files with 330 additions and 313 deletions
5
src/zutil/io/IOUtil.java
Normal file → Executable file
5
src/zutil/io/IOUtil.java
Normal file → Executable file
|
|
@ -55,7 +55,7 @@ public class IOUtil {
|
|||
|
||||
/**
|
||||
* Reads and returns all the content of a stream as a String.
|
||||
* This function will close the inout stream at the end.
|
||||
* This function will close the input stream at the end.
|
||||
*
|
||||
* @param stream
|
||||
* @return a String with the content of the stream
|
||||
|
|
@ -73,7 +73,8 @@ public class IOUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Copies all data from the input stream to the output stream
|
||||
* Copies all data from the input stream to the output stream.
|
||||
* The input stream will not be closed after method has returned.
|
||||
*/
|
||||
public static void copyStream(InputStream in, OutputStream out) throws IOException {
|
||||
byte[] buff = new byte[256];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue