code: public static void escapePropertiesKey(final String text, final Writer writer, final PropertiesKeyEscapeLevel level)
              throws IOException {
  
          if (writer == null) {
              throw new IllegalArgumentException("Argument 'writer' cannot be null");
          }
  
          if (level == null) {
              throw new IllegalArgumentException("The 'level' argument cannot be null");
          }
  
          PropertiesKeyEscapeUtil.escape(new InternalStringReader(text), writer, level);
      }
docs: <p>
  Perform a (configurable) Java Properties Key <strong>escape</strong> operation on a <tt>String</tt> input,
  writing results to a <tt>Writer</tt>.
  </p>
  <p>
  This method will perform an escape operation according to the specified
  {@link org.unbescape.properties.PropertiesKeyEscapeLevel} argument value.
  </p>
  <p>
  All other <tt>String</tt>/<tt>Writer</tt>-based <tt>escapePropertiesKey*(...)</tt> methods call this one with
  preconfigured <tt>level</tt> values.
  </p>
  <p>
  This method is <strong>thread-safe</strong>.
  </p>
  
  @param text the <tt>String</tt> to be escaped.
  @param writer the <tt>java.io.Writer</tt> to which the escaped result will be written. Nothing will
  be written at all to this writer if input is <tt>null</tt>.
  @param level the escape level to be applied, see {@link org.unbescape.properties.PropertiesKeyEscapeLevel}.
  @throws IOException if an input/output exception occurs