code: static void crossStreams(final InputStream in, final OutputStream out) throws IOException {
          final byte[] buffer = new byte[bufferSize];
          int len;
          while ((len = in.read(buffer)) != -1) {
              out.write(buffer, 0, len);
          }
      }
docs: Writes the input stream to the output stream. Doesn't close them.
  @param in input stream to read from
  @param out output stream to write to
  @throws IOException on IO error