code: public static void copy(URL from, OutputStream to) throws IOException {
          try (InputStream inputStream = from.openStream()) {
              ByteStreams.copy(inputStream, to);
          }
      }
docs: Copies all bytes from a URL to an output stream.
  
  @param from the URL to read from
  @param to the output stream
  @throws IOException if an I/O error occurs