code: public static long copy(Readable from, Appendable to) throws IOException {
      checkNotNull(from);
      checkNotNull(to);
      CharBuffer buf = CharBuffer.allocate(BUF_SIZE);
      long total = 0;
      while (from.read(buf) != -1) {
        buf.flip();
        to.append(buf);
        total += buf.remaining();
        buf.clear();
      }
      return total;
    }
docs: Copies all characters between the {@link Readable} and {@link Appendable}
  objects. Does not close or flush either object.
  
  @param from the object to read from
  @param to the object to write to
  @return the number of characters copied
  @throws IOException if an I/O error occurs