Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static long copy(FileInputStream input, FileOutputStream output) throws IOException
- {
- byte[] buffer = new byte[4096];
- long count = 0L;
- int n = 0;
- while (-1 != (n = input.read(buffer))) {
- output.write(buffer, 0, n);
- count += n;
- }
- return count;
- }
Add Comment
Please, Sign In to add comment