code: public synchronized void writeTo(Writer out) throws IOException {
  
          checkFreed();
  
          if (count > 0) {
              out.write(buf, 0, count);
          }
      }
docs: Writes the complete contents of this writer's buffered data to the
  specified writer. <p>
  
  The operation occurs as if by calling <tt>out.write(buf, 0, count)</tt>.
  
  @param out the writer to which to write the data.
  @throws java.io.IOException if an I/O error occurs.
  In particular, an <tt>IOException</tt> may be thrown
  if this writer has been {@link #free() freed}.