@Override
        public void run() {
            char[] b = new char[4096];
            int n;
            try {
                while ((n = r.read(b)) != -1) {
                    w.write(b, 0, n);
                }
            } catch (IOException ex) {
                ex.printStackTrace(System.err);
            } finally {
                try {
                    w.flush();
                    w.close();
                    r.close();
                } catch (IOException ex) {
                    ex.printStackTrace(System.err);
                }
            }
            latch.countDown();
        }