Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void copyStream(InputStream inputStream, OutputStream outputStream) throws IOException {
- byte[] buffer = new byte[8192];
- int length;
- while ((length = inputStream.read(buffer)) > -1) {
- outputStream.write(buffer, 0, length);
- }
- inputStream.close();
- outputStream.flush();
- outputStream.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement