(File file, InputStream is)
| 69 | } |
| 70 | |
| 71 | private void download(File file, InputStream is) throws IOException { |
| 72 | try (BufferedInputStream input = new BufferedInputStream(is); FileOutputStream os = new FileOutputStream(file)) { |
| 73 | byte[] buffer = new byte[16384]; |
| 74 | int readBytes; |
| 75 | while ((readBytes = input.read(buffer)) != -1) { |
| 76 | os.write(buffer, 0, readBytes); |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | private void checkCopy(String url) { |
| 82 | for (Data data : datas) { |