/** * Convenience method to write XML comment line. The <code>comment</code> is splitted to have a size of * <code>80</code> and is indented by <code>indent</code> using <code>indentSize</code>. * * @param writer not null * @param comment * @param indent positive number * @param indentSize positive number * @see #DEFAULT_COLUMN_LINE * @see #writeComment(XMLWriter, String, int, int, int) */ public static void writeComment( XMLWriter writer, String comment, int indent, int indentSize ) { writeComment( writer, comment, indent, indentSize, DEFAULT_COLUMN_LINE ); }
writeCommentLineBreak( writer, columnSize ); writeComment( writer, comment, indent, indentSize, columnSize );
/** * Write comments in a normalize way. * * @param writer not null * @param comment not null */ protected static void writeComment( XMLWriter writer, String comment ) { XmlWriterUtil.writeCommentLineBreak( writer ); XmlWriterUtil.writeComment( writer, " " ); XmlWriterUtil.writeComment( writer, comment ); XmlWriterUtil.writeComment( writer, " " ); XmlWriterUtil.writeCommentLineBreak( writer ); XmlWriterUtil.writeLineBreak( writer ); }
/** * Convenience method to write XML comment line. The <code>comment</code> is splitted to have a size of * <code>80</code>. * * @param writer not null * @param comment * @see #DEFAULT_INDENTATION_SIZE * @see #writeComment(XMLWriter, String, int, int) */ public static void writeComment( XMLWriter writer, String comment ) { writeComment( writer, comment, 0, DEFAULT_INDENTATION_SIZE ); }
/** * Write comments in the Effective POM/settings header. * * @param writer not null */ protected static void writeHeader( XMLWriter writer ) { XmlWriterUtil.writeCommentLineBreak( writer ); XmlWriterUtil.writeComment( writer, " " ); // Use ISO 8601 format for date and time String formattedDateTime = DateFormatUtils.ISO_DATETIME_FORMAT.format( System.currentTimeMillis() ); XmlWriterUtil.writeComment( writer, "Generated by Maven Site Plugin on " + formattedDateTime ); XmlWriterUtil.writeComment( writer, "See: http://maven.apache.org/plugins/maven-site-plugin/" ); XmlWriterUtil.writeComment( writer, " " ); XmlWriterUtil.writeCommentLineBreak( writer ); XmlWriterUtil.writeLineBreak( writer ); }
/** * Convenience method to write XML comment line. The <code>comment</code> is splitted to have a size of * <code>80</code> and is indented by <code>indent</code> using <code>2</code> as indentation size. * * @param writer not null * @param comment * @param indent positive number * @see #DEFAULT_INDENTATION_SIZE * @see #writeComment(XMLWriter, String, int, int) */ public static void writeComment( XMLWriter writer, String comment, int indent ) { writeComment( writer, comment, indent, DEFAULT_INDENTATION_SIZE ); }
@Override public synchronized void print(Object message) { XmlWriterUtil.writeComment(xmlWriter, new Timestamp(System.currentTimeMillis()) + " - " + message); XmlWriterUtil.writeLineBreak(xmlWriter); }
@Override public synchronized void print(Object message) { String comment = new Timestamp(System.currentTimeMillis()) + " - " + message; XmlWriterUtil.writeComment(xmlWriter, comment); XmlWriterUtil.writeLineBreak(xmlWriter); out.flush(); }
protected void initHeader( XMLWriter w ) { XmlWriterUtil.writeComment( w, getHeader() ); }