code: private static void copyStream(Reader r, Writer w) throws IOException {
          char[] buffer = new char[4096];
          for (int n = 0; -1 != (n = r.read(buffer));) {
              w.write(buffer, 0, n);
          }
      }
docs: /*
  Copying stream