code: public static void encode (Writer writer, String string, boolean encodeNewline) throws IOException
      {
          encode(writer, string, encodeNewline, true);
      }
docs: Variant of {@link #encode} where encodeNbsp is true.