code: public static void writeAndClose(Writer writer, CharSequence cs) {
          try {
              write(writer, cs);
          }
          catch (IOException e) {
              throw Lang.wrapThrow(e);
          }
          finally {
              safeClose(writer);
          }
      }
docs: 将一段文本全部写入一个writer。
  <p>
  <b style=color:red>注意</b>，它会关闭输出流
  
  @param writer
  输出流
  @param cs
  文本