public void copy()

in gepard-core/src/main/java/com/epam/gepard/util/FileUtil.java [61:80]


    public void copy(final InputStream in, final OutputStream out) throws IOException {
        byte[] buf = new byte[BUF_SIZE];
        try {
            int read;
            while ((read = in.read(buf)) >= 0) {
                out.write(buf, 0, read);
            }
        } finally {
            try {
                in.close();
            } catch (IOException ignore) {
                LOG.debug("Copy: Closing InputStream was failed.");
            }
            try {
                out.close();
            } catch (IOException ignore) {
                LOG.debug("Copy: Closing OutputStream was failed.");
            }
        }
    }