code: public long writeFrom(Readable readable) throws IOException {
      checkNotNull(readable);
  
      Closer closer = Closer.create();
      try {
        Writer out = closer.register(openStream());
        long written = CharStreams.copy(readable, out);
        out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
        return written;
      } catch (Throwable e) {
        throw closer.rethrow(e);
      } finally {
        closer.close();
      }
    }
docs: Writes all the text from the given {@link Readable} (such as a {@link Reader}) to this sink.
  Does not close {@code readable} if it is {@code Closeable}.
  
  @throws IOException if an I/O error occurs in the process of reading from {@code readable} or
  writing to this sink