code: public static void save(CharSequence chars, Writer writer) throws IOException
    {
      if(chars != null) {
        StringReader reader = new StringReader(chars.toString());
        Files.copy(reader, writer);
      }
    }
docs: Copy source characters to requested output characters stream. If given <code>chars</code> parameter is null or
  empty this method does nothing.
  
  @param chars source characters stream,
  @param writer target writer.
  @throws IOException if copy operation fails.